mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-03-06 01:20:12 +08:00
commit
630c66e5c7
@ -0,0 +1,117 @@
|
||||
[#]: subject: "How to Recover Arch Linux Install via chroot"
|
||||
[#]: via: "https://www.debugpoint.com/2021/07/recover-arch-linux/"
|
||||
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14708-1.html"
|
||||
|
||||
如何通过 chroot 恢复 Arch Linux 系统
|
||||
======
|
||||
|
||||

|
||||
|
||||
> 这个快速指南解释了恢复 Arch Linux 安装的一些方便步骤。
|
||||
|
||||
作为一个滚动发布的版本,[Arch Linux][1] 中有时会出现一些问题。不是因为你自己的行为,而是数以百计的其他原因,如新内核与你的硬件或软件的兼容性。但是,Arch Linux 仍然很棒,它提供了最新的软件包和应用。
|
||||
|
||||
但有时,它也会给你带来麻烦,你最终只能看到一个闪烁的光标,其他什么都没有。
|
||||
|
||||
所以,在这种情况下,与其重新格式化或重新安装,不如在放弃希望之前尝试恢复安装和数据。本指南概述了这个方向的一些步骤。
|
||||
|
||||
### 恢复 Arch Linux 安装
|
||||
|
||||
第一步是用 Arch Linux 创建一个可启动的<ruby>现场<rt>Live</rt></ruby> USB。从 [这个链接][3] 下载 .ISO 并创建一个可启动的 USB。你可以查看这个 [如何使用 Etcher 创建可启动的 USB][2] 的指南。记住这一步需要另一个稳定的工作系统,因为你目前的系统不能使用。
|
||||
|
||||
你需要知道你的 Arch Linux 安装在哪个分区上。这是一个非常重要的步骤。如果你不知道,你可以用 GParted 来查找。或者在你的 GRUB 菜单中查看,或者你可以运行下面的命令来了解。这将列出你所有的磁盘分区及其大小、标签:
|
||||
|
||||
```
|
||||
sudo lsblk -o name,mountpoint,label,size,uuid
|
||||
```
|
||||
|
||||
完成后,插入 USB 盘并从它启动。你应该在现场介质中看到 Arch Linux 的提示符。
|
||||
|
||||
现在,用下面的方法挂载 Arch Linux 分区。记得把 `/dev/sda3` 改成你对应的分区。
|
||||
|
||||
```
|
||||
mount /dev/sda3 /mnt
|
||||
arch-chroot /mnt
|
||||
```
|
||||
|
||||
`arch-chroot` 命令将在终端挂载你的 Arch Linux 分区,所以用你的 Arch 凭证登录。现在,在这个阶段,根据你的需要,你有以下选择。
|
||||
|
||||
* 你可以通过 `/home` 文件夹来备份你的数据。如果,故障排除方式无效的话。你可以把文件复制到外部 USB 或其他分区。
|
||||
* 核查日志文件,特别是 pacman 日志。因为,不稳定的系统可能是由升级某些软件包引起的,如图形驱动或任何其他驱动。根据日志,如果你需要的话,可以降级任何特定的软件包。
|
||||
|
||||
你可以使用下面的命令来查看 pacman 日志文件的最后 200 行,以找出任何失败的项目或依赖性删除。
|
||||
|
||||
```
|
||||
tail -n 200 /var/log/pacman.log | less
|
||||
```
|
||||
|
||||
上面的命令给出了你的 `pacman.log` 文件末尾的 200 行来验证。现在,仔细检查哪些软件包在你成功启动后被更新了。
|
||||
|
||||
并记下软件包的名称和版本。你可以尝试逐一降级软件包,或者如果你认为某个特定的软件包产生了问题。使用 `pacman -U` 开关来降级。
|
||||
|
||||
```
|
||||
pacman -U <package name>
|
||||
```
|
||||
|
||||
如果有的话,你可以在降级后运行以下命令来启动你的 Arch 系统。
|
||||
|
||||
```
|
||||
exec /sbin/init
|
||||
```
|
||||
|
||||
检查你的显示管理器的状态,是否有任何错误。有时,显示管理器会产生一个问题,无法与 X 服务器通信。例如,如果你正在使用 Lightdm,那么你可以通过以下方式检查它的状态。
|
||||
|
||||
```
|
||||
systemctl status lightdm
|
||||
```
|
||||
|
||||
或者,可以通过下面的命令启动它,并检查出现了错误。
|
||||
|
||||
```
|
||||
lightdm --test-mode --debug
|
||||
```
|
||||
|
||||
下面是一个 Lightdm 失败的例子,它导致了一个不稳定的 Arch 系统。
|
||||
|
||||
![lightdm - test mode][4]
|
||||
|
||||
或者通过使用 `startx` 启动 X 服务器来检查。
|
||||
|
||||
```
|
||||
startx
|
||||
```
|
||||
|
||||
根据我的经验,如果你在上述命令中看到错误,尝试安装另一个显示管理器并启用它,如 sddm。它可能会消除这个错误。
|
||||
|
||||
根据你的系统状态,尝试上述步骤,并进行故障排除。对于特定于显示管理器 lightdm 的错误,我们有一个 [指南][5],你可以看看。
|
||||
|
||||
如果你使用的是 sddm,那么请查看 [这些故障排除步骤][6]。
|
||||
|
||||
### 总结
|
||||
|
||||
每个安装环境都是不同的。上述步骤可能对你不起作用。但它值得一试,根据经验,它是有效的。如果它起作用,那么,对你来说是好事。无论哪种方式,请在下面的评论区中告诉我结果如何。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.debugpoint.com/2021/07/recover-arch-linux/
|
||||
|
||||
作者:[Arindam][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.debugpoint.com/author/admin1/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://www.debugpoint.com/tag/arch-linux
|
||||
[2]: https://www.debugpoint.com/2021/01/etcher-bootable-usb-linux/
|
||||
[3]: https://archlinux.org/download/
|
||||
[4]: https://www.debugpoint.com/wp-content/uploads/2021/03/lightdm-test-mode.jpg
|
||||
[5]: https://www.debugpoint.com/2021/03/failed-to-start-lightdm/
|
||||
[6]: https://wiki.archlinux.org/title/SDDM#Troubleshooting
|
@ -3,45 +3,47 @@
|
||||
[#]: author: "James Kiarie https://www.linuxtechi.com/author/james/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "robsean"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14699-1.html"
|
||||
|
||||
如何双启动 Ubuntu 22.04 LTS 和 Windows 11
|
||||
======
|
||||
嗨,伙计们,在这篇指南中,我们将演示如何在 Windows 11 的旁侧配置 Ubuntu 22.04 LTS (Jammy Jellyfish) 的双启动设置
|
||||
|
||||
为使其能工作,你需要在你的计算机上安装 windows 11 。接下来,你将需要在你的硬盘驱动器上创建一个单独的分区,你将在此分区上安装 Ubuntu 22.04 。我们将包含这点知识,因此不要担心。
|
||||

|
||||
|
||||
##### 必要条件
|
||||
嗨,伙计们,在这篇指南中,我们将演示如何在 Windows 11 的之外配置 Ubuntu 22.04 LTS(Jammy Jellyfish)的双启动设置。
|
||||
|
||||
在设置双启动前,这些是你所需要的。
|
||||
为使其能工作,你需要在你的计算机上已经安装好了 Windows 11 。接下来,你将需要在你的硬盘驱动器上创建一个单独的分区,你将在此分区上安装 Ubuntu 22.04 。我们将包含这点知识,因此不要担心。
|
||||
|
||||
* 一个 Ubuntu 22.04 的可启动 USB 驱动器,你可以转到 [Ubuntu 22.04 下载页面][1] 来下载 Ubuntu 22.04 的 ISO 镜像文件。在 ISO 镜像文件到位后,抓取一个 16GB USB 驱动器,并使用 Rufus 应用程序来使其可启动。
|
||||
**前置条件:**
|
||||
|
||||
* 快速稳定的因特网连接
|
||||
在设置双启动前,这些是你所需要的:
|
||||
|
||||
* 一个 Ubuntu 22.04 的可启动 USB 驱动器,你可以转到 [Ubuntu 22.04 下载页面][1] 来下载 Ubuntu 22.04 的 ISO 镜像文件。在 ISO 镜像文件到位后,拿一个 16GB USB 驱动器,并使用 Rufus 应用程序来使其可启动。
|
||||
* 快速稳定的互联网连接
|
||||
|
||||
### 步骤 1、在你的硬盘驱动器上创建一个可用的分区
|
||||
|
||||
正如介绍中所提到的,我们首先需要在硬盘驱动器上创建一个单独的分区,我们将在其中安装 Ubuntu 22.04 。
|
||||
|
||||
因此,通过按下 **Windows + R** 组合键来打开磁盘管理器实用程序
|
||||
因此,通过按下 `Windows + R` 组合键来打开磁盘管理器实用程序。
|
||||
|
||||
在对话框中,输入 diskmgmt.msc ,并按下 <ruby>回车键<rt>ENTER</rt></ruby> 按键。
|
||||
在对话框中,输入 `diskmgmt.msc` ,并按下回车键。
|
||||
|
||||
![][2]
|
||||
|
||||
<ruby>磁盘管理<rt>disk management</rt></ruby>控制台将显示当前磁盘分区,如你将在下面所看到的一样。我们将通过压缩 ‘卷 E’ 来创建一个用于安装 Ubuntu 的分区。这在你的安装过程中可能有所不同,但是只需要跟着做,你就会理解其中的大体意思。
|
||||
<ruby>磁盘管理<rt>disk management</rt></ruby>控制台将显示当前磁盘分区,如你将在下面所看到的一样。我们将通过压缩 “卷 E” 来创建一个用于安装 Ubuntu 的分区。这在你的安装过程中可能有所不同,但是只需要跟着做,你就会理解其中的大体意思。
|
||||
|
||||
![][3]
|
||||
|
||||
因此,在你想要压缩的磁盘驱动器卷上右键,并在弹出的菜单中选择 <ruby>压缩卷<rt>Shrink</rt></ruby> 选项。
|
||||
因此,在你想要压缩的磁盘驱动器卷上点击鼠标右键,并在弹出的菜单中选择 <ruby>压缩卷<rt>Shrink</rt></ruby> 选项。
|
||||
|
||||
![][4]
|
||||
|
||||
一个弹出对话框将会出现,如下所示。具体指定压缩的控件大小(以 MB 为单位),并单 <ruby>压缩卷<rt>Shrink</rt></ruby> 。
|
||||
将会出现一个弹出对话框,如下所示。具体指定压缩的控件大小(以 MB 为单位),并单击 <ruby>压缩卷<rt>Shrink</rt></ruby> 。
|
||||
|
||||
这是指定给 Ubuntu 22.04 安装所用的空间.
|
||||
这是指定给 Ubuntu 22.04 安装所用的空间。
|
||||
|
||||
![][5]
|
||||
|
||||
@ -49,11 +51,11 @@
|
||||
|
||||
![][6]
|
||||
|
||||
随着可用空间的到来,现在将可启动 USB 媒介盘插入到你的 PC ,并重新启动你的系统。此外,要确保访问 BIOS 设置,并修改启动优先级,来使 USB 驱动器成为第一优先级。保存 BIOS 更改并继续启动。
|
||||
随着有了可用空间,现在将可启动 USB 驱动器插入到你的 PC ,并重新启动你的系统。此外,要确保访问 BIOS 设置,并修改启动优先级,来使 USB 驱动器成为第一优先级。保存 BIOS 更改并继续启动。
|
||||
|
||||
### 步骤 2、开始安装
|
||||
|
||||
在第一屏幕中,你将得到如图所示的 GRUB 菜单。选择第一个选项 <ruby>尝试或安装 Ubuntu<rt>Try or Install Ubuntu</rt></ruby> ,并按下 <ruby>回车键<rt>ENTER</rt></ruby> 按键。
|
||||
在第一个屏幕中,你将得到如图所示的 GRUB 菜单。选择第一个选项 <ruby>尝试或安装 Ubuntu<rt>Try or Install Ubuntu</rt></ruby> ,并按下 <ruby>回车键<rt>ENTER</rt></ruby> 按键。
|
||||
|
||||
![][7]
|
||||
|
||||
@ -69,7 +71,7 @@ Ubuntu 22.04 将开始加载,如下所示。这最多需要一分钟。
|
||||
|
||||
![][10]
|
||||
|
||||
在 <ruby>更新和其它软件<rt>Updates and Other Software</rt></ruby> 步骤中,选择 <ruby>正常安装<rt>Normal Installation</rt></ruby>以便安装 Ubuntu的 GUI 版本,通过勾选其它剩余选项来允许下载更新和安装第三方的针对于图像、WIFI 硬件和其它实用程序的软件包
|
||||
在 <ruby>更新和其它软件<rt>Updates and Other Software</rt></ruby> 步骤中,选择 <ruby>正常安装<rt>Normal Installation</rt></ruby> 以便安装 Ubuntu的 GUI 版本,通过勾选其它剩余选项来允许下载更新和安装第三方的针对于图像、WIFI 硬件和其它实用程序的软件包。
|
||||
|
||||
接下来,单击 <ruby>继续<rt>Continue</rt></ruby> 按钮。
|
||||
|
||||
@ -85,29 +87,29 @@ Ubuntu 22.04 将开始加载,如下所示。这最多需要一分钟。
|
||||
|
||||
针对 Ubuntu 22.04 ,我们将创建下面的分区:
|
||||
|
||||
* /boot – 1 GB
|
||||
* /home – 10 GB
|
||||
* / – 12 GB
|
||||
* Swap – 2 GB
|
||||
* EFI – 300 MB
|
||||
* `/boot` – 1 GB
|
||||
* `/home` – 10 GB
|
||||
* `/` – 12 GB
|
||||
* 交换分区 – 2 GB
|
||||
* EFI – 300 MB
|
||||
|
||||
为开始使用这些分区,单击 <ruby>可用空间<rt>Free Space</rt></ruby>分区下面的 [ + ] 符号。
|
||||
为开始使用这些分区,单击 <ruby>可用空间<rt>Free Space</rt></ruby>分区下面的 “+” 符号。
|
||||
|
||||
![][13]
|
||||
|
||||
如图显示填写 /boot 分区的详细信息,然后单击 <ruby>确定<rt>OK</rt></ruby> 按钮。
|
||||
如图显示填写 `/boot` 分区的详细信息,然后单击 <ruby>确定<rt>OK</rt></ruby> 按钮。
|
||||
|
||||
![][14]
|
||||
|
||||
接下来,具体指定 /home 分区,并单击 <ruby>确定<rt>OK</rt></ruby> 按钮。
|
||||
接下来,具体指定 `/home` 分区,并单击 <ruby>确定<rt>OK</rt></ruby> 按钮。
|
||||
|
||||
![][15]
|
||||
|
||||
接下来,定义 / ( root ) 分区,并单击 <ruby>确定<rt>OK</rt></ruby> 按钮。
|
||||
接下来,定义 `/`(根)分区,并单击 <ruby>确定<rt>OK</rt></ruby> 按钮。
|
||||
|
||||
![][16]
|
||||
|
||||
为定义 swap 空间,设置大小,并在 <ruby>使用为<rt>Use as</rt></ruby>:选项中选择 <ruby>交换区域<rt>Swap area</rt></ruby>。
|
||||
为定义交换空间,设置大小,并在 <ruby>使用为<rt>Use as</rt></ruby>:选项中选择 <ruby>交换区域<rt>Swap area</rt></ruby>。
|
||||
|
||||
![][17]
|
||||
|
||||
@ -115,7 +117,7 @@ Ubuntu 22.04 将开始加载,如下所示。这最多需要一分钟。
|
||||
|
||||
![][18]
|
||||
|
||||
下图是一份我们的分区表的分区摘要。
|
||||
下图是一份我们的分区表的分区摘要:
|
||||
|
||||
![][19]
|
||||
|
||||
@ -141,17 +143,17 @@ Ubuntu 22.04 将开始加载,如下所示。这最多需要一分钟。
|
||||
|
||||
![][24]
|
||||
|
||||
在这时,移除你的可启动 USB 驱动器,并按下 <ruby>回车键<rt>ENTER</rt></ruby> 按键。
|
||||
在这时,移除你的可启动 USB 驱动器,并按下回车键。
|
||||
|
||||
![][25]
|
||||
|
||||
在系统重新启动时,你将找到 Ubuntu 和 Windows 11 的所有选项。
|
||||
在系统重新启动时,你将找到包括 Ubuntu 和 Windows 11 在内的各种选项。
|
||||
|
||||
选择 ‘Ubuntu’ 来启动到你的新 Ubuntu 22.04 安装。为启动到 Windows 11,选择标有 <ruby>Windows 恢复环境<rt>Windows Recovery Environment</rt></ruby> 的条目。
|
||||
选择 “Ubuntu” 来启动到你的新 Ubuntu 22.04 安装。要启动到 Windows 11,请选择标有 <ruby>Windows 恢复环境<rt>Windows Recovery Environment</rt></ruby> 的条目。
|
||||
|
||||
![][26]
|
||||
|
||||
就这样。我们演示了如何双启动 Windows 11 和 Ubuntu 22.04.
|
||||
就这样。我们演示了如何双启动 Windows 11 和 Ubuntu 22.04。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
@ -160,7 +162,7 @@ via: https://www.linuxtechi.com/dual-boot-ubuntu-22-04-and-windows-11/
|
||||
作者:[James Kiarie][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[robsean](https://github.com/robsean)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
@ -0,0 +1,276 @@
|
||||
[#]: subject: "How To Boot Into Rescue Mode Or Emergency Mode In Ubuntu 22.04 / 20.04 / 18.04"
|
||||
[#]: via: "https://ostechnix.com/how-to-boot-into-rescue-mode-or-emergency-mode-in-ubuntu-18-04/"
|
||||
[#]: author: "sk https://ostechnix.com/author/sk/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "robsean"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14709-1.html"
|
||||
|
||||
详解在 Ubuntu 中引导到救援模式或紧急模式
|
||||
======
|
||||
|
||||

|
||||
|
||||
这篇教程将介绍如何在 Ubuntu 22.04、20.04 和 18.04 LTS 版本中引导到 <ruby>救援<rt>Rescue</rt></ruby> 模式或 <ruby>紧急<rt>Emergency</rt></ruby> 模式。
|
||||
|
||||
> 你可能已经知道,在 RHEL 7 、RHEL 8 、Ubuntu 16.04 LTS 及其更新的版本的 Linux 发行版中 <ruby>运行等级<rt>Runlevels</rt></ruby> 已经被 <ruby>系统目标<rt>Systemd target</rt></ruby> 所替代。更多关于 <ruby>运行等级<rt>Runlevel</rt></ruby> 和 <ruby>系统目标<rt>Systemd targets</rt></ruby> 的信息,参考 [这篇指南][1] 。
|
||||
|
||||
这篇指南是针对 Ubuntu 编写的,但是,下面所给的步骤应该也适用于大多数使用 systemd 作为默认服务管理器的 Linux 发行版。
|
||||
|
||||
在进入主题前,让我们简单的理解:什么是 <ruby>救援<rt>rescue</rt></ruby> 模式 和 <ruby>紧急<rt>Emergency</rt></ruby> 模式,以及这两种模式的目的是什么。
|
||||
|
||||
### 什么是救援模式?
|
||||
|
||||
在 Linux 发行版中,救援模式等效于使用 SysV 作为默认的服务器管理器的 <ruby>单用户<rt>single user</rt></ruby> 模式。在救援模式中,将挂载所有的本地文件系统,将仅启动一些重要的服务。但是,不会启动一般的服务(例如,网络服务)。
|
||||
|
||||
救援模式在不能正常引导系统的情况下是很有用的。此外,我们可以在救援模式下执行一些重要的救援操作,例如,[重新设置 root 密码][2] 。
|
||||
|
||||
### 什么是紧急模式?
|
||||
|
||||
与救援模式相比,在紧急模式中,不会启动任何的东西。不会启动服务、不会挂载挂载点、不会建立套接字、什么都不会启动。你将所拥有的只是一个 **原始的 shell** 。紧急模式适用于调试目的。
|
||||
|
||||
首先,我们将看到如何在 Ubuntu 22.04 和 20.04 LTS 发行版中引导到救援模式或紧急模式。在 Ubuntu 22.04 和 20.04 LTS 中的过程是完全相同的!
|
||||
|
||||
### 在 Ubuntu 22.04 / 20.04 LTS 中引导到救援模式
|
||||
|
||||
我们可以使用两种方法来引导到救援模式。
|
||||
|
||||
#### 方法 1
|
||||
|
||||
打开你的 Ubuntu 系统。在 BIOS 徽标出现后,按下 `ESC` 按键来显示 GRUB 菜单。
|
||||
|
||||
在 GRUB 菜单中,选择第一项,并按下 `e` 按键来编辑它。
|
||||
|
||||
![GRUB Menu In Ubuntu 22.04 / 20.04 LTS][3]
|
||||
|
||||
按下 `↓` 按键,并找到以单词 `linux` 开头的一行代码,并在其结尾处添加下面的一行代码。为到达其结尾处,只需要按下 `Ctrl + e` 组合键,或使用你键盘上的 `END` 按键或 `←`/`→` 按键。
|
||||
|
||||
```
|
||||
systemd.unit=rescue.target
|
||||
```
|
||||
|
||||
![Edit Grub Boot Menu Entries To Enter Into Rescue Mode In Ubuntu 22.04 / 20.04 LTS][4]
|
||||
|
||||
在添加上面的代码行后,按下 `Ctrl + x` 组合键或按下 `F10` 按键来引导到救援模式。
|
||||
|
||||
数秒后,你将作为 root 用户来登录到救援模式(即单用户模式)。将会提示你按下回车键来进入维护。
|
||||
|
||||
下图是 Ubuntu 22.04 / 20.04 LTS 系统的救援模式的样子:
|
||||
|
||||
![Boot Into Rescue Mode In Ubuntu 22.04 / 20.04 LTS][5]
|
||||
|
||||
现在,在救援模式中做你想做的任何事。在救援模式中,在你执行任何操作前,你可能需要以 读/写模式来挂载根(`/`)文件系统。
|
||||
|
||||
```
|
||||
mount -n -o remount,rw /
|
||||
```
|
||||
|
||||
![Mount Root File System In Read Write Mode In Ubuntu 22.04 / 20.04 LTS][6]
|
||||
|
||||
在完成后,按下 `Ctrl + d` 组合键来引导到正常模式。或者,你可以输入下面的任意一个命令来引导到正常模式。
|
||||
|
||||
```
|
||||
systemctl default
|
||||
```
|
||||
|
||||
或者,
|
||||
|
||||
```
|
||||
exit
|
||||
```
|
||||
|
||||
如果你想重新启动系统,而不是引导到正常的模式,输入:
|
||||
|
||||
```
|
||||
systemctl reboot
|
||||
```
|
||||
|
||||
#### 方法 2
|
||||
|
||||
在这种方法中,你不需要编辑 GRUB 启动菜单项目。
|
||||
|
||||
打开系统电源,并从 GRUB 启动菜单中选择 <ruby>Ubuntu 高级选项<rt>Advanced options for Ubuntu</rt></ruby>。
|
||||
|
||||
![Choose Advanced Options For Ubuntu From Grub Boot Menu][7]
|
||||
|
||||
接下来,你将看到一个带有内核版本的可用的 Ubuntu 版本的列表。在 Ubuntu 中的 GRUB 启动菜单中选择 <ruby>恢复模式<rt>Recovery mode</rt></ruby> 。
|
||||
|
||||
![Choose Recovery Mode In Grub Boot Menu In Ubuntu 22.04 / 20.04 LTS][8]
|
||||
|
||||
数秒后,你将看到 Ubuntu 的 <ruby>恢复<rt>Recovery</rt></ruby> 菜单。从恢复菜单中,选择 <ruby>进入 root 的 shell 提示符<rt>Drop to root shell prompt</rt></ruby> 选项 ,并按下回车键。
|
||||
|
||||
![Enter Into Root Shell Prompt In Ubuntu 22.04 / 20.04 LTS][9]
|
||||
|
||||
现在,你将进入维护。
|
||||
|
||||
![Ubuntu Maintenance Mode][10]
|
||||
|
||||
通过输入下面的命令来 以读/写模式的方式 来挂载根(`/`)文件系统:
|
||||
|
||||
```
|
||||
mount -n -o remount,rw /
|
||||
```
|
||||
|
||||
![Mount Root File System In Read Write Mode In Ubuntu][11]
|
||||
|
||||
在救援模式中做你想做的任何事。
|
||||
|
||||
在完成后,输入 `exit` 来返回到恢复菜单。
|
||||
|
||||
```
|
||||
exit
|
||||
```
|
||||
|
||||
最后,选择 <ruby>救援正常启动<rt>Resume normal boot</rt></ruby> 选项,并按下回车键。
|
||||
|
||||
![Boot Into Normal Mode In Ubuntu][12]
|
||||
|
||||
再次按下回车键来退出恢复模式,并继续引导到正常模式。
|
||||
|
||||
![Exit The Recovery Mode In Ubuntu][13]
|
||||
|
||||
如果你不想引导到正常模式,从救援模式中输入 `reboot` 并按下回车键来重新启动你的系统。
|
||||
|
||||
### 在 Ubuntu 22.04 / 20.04 LTS 中引导到紧急模式
|
||||
|
||||
当 GRUB 菜单出现时,按下 `e` 按键来编辑它。
|
||||
|
||||
![GRUB Menu In Ubuntu 22.04 / 20.04 LTS][14]
|
||||
|
||||
找到以单词 `linux` 开头的一行代码,并在其结尾处添加下面的一行代码:
|
||||
|
||||
```
|
||||
systemd.unit=emergency.target
|
||||
```
|
||||
|
||||
![Edit Grub Boot Menu Entries To Enter Into Emergency Mode In Ubuntu 22.04 / 20.04 LTS][15]
|
||||
|
||||
在添加上面的代码行后,按下 `Ctrl + x` 组合键,或按下 `F10` 按键来引导到紧急模式。
|
||||
|
||||
数秒后,你将作为 `root` 用户来进入维护。将会提示你按下回车键来进入紧急模式。
|
||||
|
||||
下图是 Ubuntu 22.04 / 20.04 LTS 系统的紧急模式的样子:
|
||||
|
||||
![Boot Into Emergency Mode In Ubuntu 22.04 / 20.04 LTS][16]
|
||||
|
||||
现在,在紧急模式中做你想做的任何事。在紧急模式中,在你执行任何操作前,你可能需要以读/写模式来挂载根(`/`)文件系统。
|
||||
|
||||
```
|
||||
mount -n -o remount,rw /
|
||||
```
|
||||
|
||||
在完成后,按下 `Ctrl + d` 组合键来引导到正常模式。或者,你可以输入下面的任意一个命令来引导到正常模式。
|
||||
|
||||
```
|
||||
systemctl default
|
||||
```
|
||||
|
||||
或者,
|
||||
|
||||
```
|
||||
exit
|
||||
```
|
||||
|
||||
如果你想重新启动系统,而不是引导到正常模式,输入:
|
||||
|
||||
```
|
||||
systemctl reboot
|
||||
```
|
||||
|
||||
### 在 Ubuntu 18.04 LTS 中引导到救援模式
|
||||
|
||||
启动你的 Ubuntu 系统。当 GRUB 菜单出现时,选择第一项并按下按键 `e` 来编辑。(为到达其行尾处,只需要按下 `Ctrl + e` 组合键,或使用你键盘上的 `END` 按键或 `←`/`→` 按键):
|
||||
|
||||
![Grub Menu][17]
|
||||
|
||||
如果你没有看到 GRUB 菜单,只需要在 BIOS 徽标出现后,按下 `ESC` 按键来显示 GRUB 菜单。
|
||||
|
||||
找到以单词 `linux` 开头的一行代码,并在其结尾处添加下面的一行代码(为到达其行尾处,只需要按下 `Ctrl + e` 组合键,或使用你键盘上的 END` 按键或 `←`/`→` 按键):
|
||||
|
||||
```
|
||||
systemd.unit=rescue.target
|
||||
```
|
||||
|
||||
![Edit Grub Menu][18]
|
||||
|
||||
在添加上面的代码行后,只需要按下 `Ctrl + x` 组合键,或按下 `F10` 按键来引导到救援模式。数秒后,你将作为 `root` 用户进入维护(即单用户模式)。
|
||||
|
||||
下图是 Ubuntu 18.04 LTS 服务器系统的救援模式的样子:
|
||||
|
||||
![Ubuntu Rescue Mode][19]
|
||||
|
||||
接下来,输入下面的命令来挂载根(`/`)文件系统为读/写模式。
|
||||
|
||||
```
|
||||
mount -n -o remount,rw /
|
||||
```
|
||||
|
||||
### 在 Ubuntu 18.04 LTS 中引导到紧急模式
|
||||
|
||||
引导你的 Ubuntu 到紧急模式基本与上述方法相同。你所需要做的全部工作是,在编辑 GRUB 菜单时,将 `systemd.unit=rescue.target` 替换为 `systemd.unit=emergency.target` 。
|
||||
|
||||
![Edit Grub Menu][20]
|
||||
|
||||
在你添加 `systemd.unit=emergency.target` 后,按下 `Ctrl + x` 组合键,或按下 `F10` 按键来引导到紧急模式。
|
||||
|
||||
![Ubuntu Emergency Mode][21]
|
||||
|
||||
最后,你可以使用下面的命令来以读/写模式的方式来挂载根(`/`)文件系统:
|
||||
|
||||
```
|
||||
mount -n -o remount,rw /
|
||||
```
|
||||
|
||||
### 在救援模式和紧急模式之间切换
|
||||
|
||||
如果你正在救援模式中,你不必像我上述提到的那样来编辑 GRUB 的菜单启动项。相反,你只想要输入下面的命令来立刻切换到紧急模式:
|
||||
|
||||
```
|
||||
systemctl emergency
|
||||
```
|
||||
|
||||
同样,为从紧急模式切换到救援模式,输入:
|
||||
|
||||
```
|
||||
systemctl rescue
|
||||
```
|
||||
|
||||
### 总结
|
||||
|
||||
现在,你知道了什么是救援模式和紧急模式,以及如何在 Ubuntu 22.04 、20.04 和 18.04 LTS 系统中启动到这些模式。正如我已经提到的,在这里提供的这些步骤应该也适用于大多数当前使用 systemd 作为默认服务管理器的 Linux 发行版。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://ostechnix.com/how-to-boot-into-rescue-mode-or-emergency-mode-in-ubuntu-18-04/
|
||||
|
||||
作者:[sk][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[robsean](https://github.com/robsean)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://ostechnix.com/author/sk/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://ostechnix.com/check-runlevel-linux/
|
||||
[2]: https://ostechnix.com/how-to-reset-or-recover-root-user-password-in-linux/
|
||||
[3]: https://ostechnix.com/wp-content/uploads/2022/05/GRUB-Menu-In-Ubuntu-22.04-LTS.png
|
||||
[4]: https://ostechnix.com/wp-content/uploads/2022/05/Edit-Grub-Boot-Menu-Entries-To-Enter-Into-Rescue-Mode-In-Ubuntu-22.04-LTS.png
|
||||
[5]: https://ostechnix.com/wp-content/uploads/2022/05/Boot-Into-Rescue-Mode-In-Ubuntu-22.04.png
|
||||
[6]: https://ostechnix.com/wp-content/uploads/2022/05/Mount-Root-File-System-In-Read-Write-Mode-In-Ubuntu.png
|
||||
[7]: https://ostechnix.com/wp-content/uploads/2022/05/Choose-Advanced-Options-For-Ubuntu-From-Grub-Boot-Menu.png
|
||||
[8]: https://ostechnix.com/wp-content/uploads/2022/05/Choose-Recovery-Mode-In-Grub-Boot-Menu-In-Ubuntu.png
|
||||
[9]: https://ostechnix.com/wp-content/uploads/2022/05/Enter-Into-Root-Shell-Prompt-In-Ubuntu.png
|
||||
[10]: https://ostechnix.com/wp-content/uploads/2022/05/Ubuntu-Maintenance-Mode.png
|
||||
[11]: https://ostechnix.com/wp-content/uploads/2022/05/Mount-Root-File-System-In-Read-Write-Mode-In-Ubuntu-1.png
|
||||
[12]: https://ostechnix.com/wp-content/uploads/2022/05/Boot-Into-Normal-Mode-In-Ubuntu.png
|
||||
[13]: https://ostechnix.com/wp-content/uploads/2022/05/Exit-The-Recovery-Mode-In-Ubuntu.png
|
||||
[14]: https://ostechnix.com/wp-content/uploads/2022/05/GRUB-Menu-In-Ubuntu-22.04-LTS.png
|
||||
[15]: https://ostechnix.com/wp-content/uploads/2022/05/Edit-Grub-Boot-Menu-Entries-To-Enter-Into-Emergency-Mode-In-Ubuntu.png
|
||||
[16]: https://ostechnix.com/wp-content/uploads/2018/12/Boot-Into-Emergency-Mode-In-Ubuntu-20.04-LTS.png
|
||||
[17]: https://ostechnix.com/wp-content/uploads/2018/12/Grub-menu.png
|
||||
[18]: https://ostechnix.com/wp-content/uploads/2018/12/Edit-grub-menu.png
|
||||
[19]: https://ostechnix.com/wp-content/uploads/2018/12/Ubuntu-rescue-mode.png
|
||||
[20]: https://ostechnix.com/wp-content/uploads/2018/12/emergency-mode.png
|
||||
[21]: https://ostechnix.com/wp-content/uploads/2018/12/emergency-mode-1.png
|
141
published/20220523 7 pieces of Linux advice for beginners.md
Normal file
141
published/20220523 7 pieces of Linux advice for beginners.md
Normal file
@ -0,0 +1,141 @@
|
||||
[#]: subject: "7 pieces of Linux advice for beginners"
|
||||
[#]: via: "https://opensource.com/article/22/5/linux-advice-beginners"
|
||||
[#]: author: "Opensource.com https://opensource.com/users/admin"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "lightchaserhy"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14712-1.html"
|
||||
|
||||
给 Linux 初学者的 7 条建议
|
||||
======
|
||||
|
||||
> 我们咨询了我们社区作者们,分享了他们的初学经验。
|
||||
|
||||

|
||||
|
||||
对 Linux 的新用户有什么建议?我们请社区的作者们分享了他们初学时的最佳经验。
|
||||
|
||||
### 1、用好 Linux 资源
|
||||
|
||||
我哥们儿告诉我,Linux 就像一个“软件积木搭建套装”(这是一个过时的词汇,指的是上世纪五六十年代流行的建筑积木玩具),这个比喻比较恰当。在 2001、2002 年那时,我曾经利用 Windows 3.1 和 Windows NT,尝试搭建一个安全、有用的 K12 学区网站,当时网上可用的资料不多。其中被推荐的《ROOT 用户指南》是一本“大部头”专业教程,信息丰富,但是有一定上手难度。
|
||||
|
||||
于我而言,Mandrake Linux 的线上课程是最有用的资源。该课程对使用和管理 Linux 桌面或服务器进行了详细的解读。我学习了该课程,并同时利用红帽公司维护的一个邮件列表服务,有问题时就在社区提问寻求帮助。
|
||||
|
||||
—— [Don Watkins][2]
|
||||
|
||||
### 2、在 Linux 社区寻求帮助
|
||||
|
||||
我的建议是要多问,你可以从网上搜索信息开始,看看其他人类似的问题(甚至是更好的提问)。问什么和如何问,需要花一定时间熟悉。
|
||||
|
||||
一旦你对 Linux 更加熟悉了,查看你感兴趣的各种相关论坛,在提问前,先看看是否有人已经提过相同问题,并获得了答案。
|
||||
|
||||
加入邮件列表也很有用,最后你会发现自己也能专业地答复提问。正如他们说的,通过回答他人的问题也会学到更多知识。
|
||||
|
||||
同时,你会越来越熟悉这个操作系统内部运行机制,再也不是初学时的一无所知。
|
||||
|
||||
—— [Greg Pittman][3]
|
||||
|
||||
我的建议是利用 `man`、`info` 等帮助命令获取信息。另外,尽可能花时间熟悉命令行界面,且真正理解 UNIX 的设计理念。事实上,我最喜欢的书之一就是一本 80 年代的 UNIX 书籍,对理解文件、目录、设备、基础命令等非常有帮助。
|
||||
|
||||
—— [Alan Formy-Duval][4]
|
||||
|
||||
我最好的建议是充分相信社区的答复、手册页的详细信息、介绍不同选项的 HOW-TO 文档。不管怎么说,我是在 2009 年左右开始学习的,当时有很多可用的工具和资源。有一个叫 “Linux from Scratch(LFS)”的项目 —— 从源码开始创建 Linux 系统,在这个项目我学会了很多内部原理知识,以及如何创建一个 LFS 镜像。
|
||||
|
||||
—— [Sumantro Mukherjee][6]
|
||||
|
||||
我的建议是泛读。利用像 “Ask Fedora”、“Fedora Matrix chat” 等论坛,阅读他人的经验观点,并且尝试实践。我通过阅读他人的网上争论学习到很多东西,然后我会尝试找出问题的原因。
|
||||
|
||||
—— [Steve Morris][8]
|
||||
|
||||
### 3、安装双操作系统
|
||||
|
||||
我在 90 年代末就开始安装双操作系统(Windows 和 Linux),虽然我真正想使用的是 Linux 操作系统,但我最终还是启动了 Windows 系统,以便在熟悉的桌面环境中工作。最好的建议之一是改变计算机系统启动顺序,所以每次我都反应不够快,自动进入了 Linux 系统。: )
|
||||
|
||||
—— [Heike Jurzik][9]
|
||||
|
||||
我的团队里的一个人挑战我,要做一个知识交换。
|
||||
|
||||
他是我们的 Linux 系统管理员,利用 Joomla 搭建了一个网站(我们的 Web 团队擅长这个,他想学习更多知识),而我则安装了 Linux(以前一直是用 Windows)。我们一开始就用了双启动,因为我还有一堆依赖于操作系统的软件需要用于业务,但这让我对 Linux 的使用有了一个飞跃。
|
||||
|
||||
在我们各自学习新系统时,对方作为专家来互相帮助有助于共同成长,“一个都不能少!”,坚持不懈是一个很大的挑战。
|
||||
|
||||
我经历一个相当尴尬的低级错误后,在显示器上贴了一个大便签,上面写着“在使用任何 `rm` 操作前,首先要思考一下”。管理员给我写了一个命令行大全(网上有很多类似的),对于熟悉基础操作非常有用。我开始使用 Ubuntu 的 KDE 桌面环境时,发现对习惯于使用图形界面的初学者很有帮助。
|
||||
|
||||
从那以后我就开始长期使用 Linux(除了我的工作计算机),而那位管理员仍然在用 Joomla,看起来我俩都得到了成长。
|
||||
|
||||
—— [Ruth Cheesley][12]
|
||||
|
||||
### 4、为了安全请先备份
|
||||
|
||||
我的建议是使用一个带有简单且强大的备份软件的发行版。Linux 新用户会创建、编辑、破坏和恢复系统配置。当操作系统无法启动、丢失数据时,会让他们非常沮丧。
|
||||
|
||||
有了备份软件,他们的数据就有了保障。
|
||||
|
||||
我们都喜爱 Linux,因为它能让我们自由飞翔,但这是“双刃剑”,使用不当也有可能发生非常严重的错误。
|
||||
|
||||
—— [Giuseppe Cassibba][13]
|
||||
|
||||
### 5、分享你的 Linux 经验
|
||||
|
||||
我的建议是分享你的 Linux 使用经验。我曾经认为有一些发行版更适合新用户,所以当他们咨询使用 Linux 时,我总是推荐这些为“新用户准备的”发行版。但是当我坐在他们的计算机前,看起来却像是我从未用过 Linux 一样,因为一些新功能我也不熟悉。现在当有人咨询时,我会推荐自己使用的发行版,虽说这不一定是初学者的“最佳”版本,但毕竟我熟悉,他们遇到的问题我能够快速解决(当然我自己也会在分享中学到新东西)。
|
||||
|
||||
—— [Seth Kenlon][14]
|
||||
|
||||
以前有句俗话叫“不要随便使用杂志封面上宣传的发行版,使用你朋友都在用的,当你遇到问题时才能更好地需求帮助”。将关键词“杂志封面”替换为“互联网”,这句话依然有效 : -) 。我从未听从过这个建议,因为我是方圆五十公里内唯一使用 Linux 的人,周围的人都在用 FreeBSD、IRIX、Solaris 和 Windows 3.11 等操作系统,最后,我就是那个被人们寻求 Linux 帮助的人。
|
||||
|
||||
—— [Peter Czanik][15]
|
||||
|
||||
### 6、坚持学习 Linux
|
||||
|
||||
在到 Red Hat 工作前,我是一名分销商合作伙伴,我有几个提供旅行护士的家庭健康代理机构客户,他们使用了一个叫“Carefacts”的软件包,最初用于 DOS,在旅行笔记本电脑和中心数据库同步中总是出错。
|
||||
|
||||
早期我听到的最好建议是认真研究一下开源运动。开源在 2022 年是主流思想,但在一代人以前,从 Red Hat 的零售商购买 Linux 安装光盘是带有革命性的创新行为。开源打破了常规,我认为要客观看待开源,但确实惊叹到了相当一部分人。
|
||||
|
||||
我的公司在 20 世纪 90 年代中期搭建了第一个客户防火墙,那是基于 Windows NT 和 Altavista 的一个产品,但是经常发生错误崩溃。我们自己又搭建了一个基于 Linux 的防火墙,再也没有出问题了。因此,我们用 Linux 替换了客户的那套 Altavista 系统,稳定地运行了多年。我们在 1999 年底搭建了另一个客户防火墙,当时我花三周读完了一本关书,介绍了数据包过滤和 ipchains 的正确使用,当我完成时感觉超赞,它解决了所有问题。在接下来的 15 年,我搭建安装了数百个防火墙系统,主要采用 iptables 技术,有些利用桥接或 ARP 代理以及 QOS 保障视频会议传输,有些利用 IPSEC 和 OpenVPN 隧道。我靠管理个人防火墙和一些双机热备系统赚取生活费,非常不错,而以前都是用的 Windows 系统。我甚至还建了一些虚拟防火墙。
|
||||
|
||||
但是技术在高速发展,2022 年,iptables 已过时,我以前的防火墙技术也成了美好的回忆。
|
||||
|
||||
目前的经验之谈?永远不要停止探索。
|
||||
|
||||
—— [Greg Scott][19]
|
||||
|
||||
### 7、享受过程
|
||||
|
||||
耐心点,Linux 和之前你熟悉的操作系统不太相同,准备拥抱一个充满无限可能的新世界,尽情享受吧。
|
||||
|
||||
—— [Alex Callejas][20]
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/5/linux-advice-beginners
|
||||
|
||||
作者:[Opensource.com][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[lightchaserhy](https://github.com/lightchaserhy)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/admin
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://opensource.com/sites/default/files/lead-images/yearbook-haff-rx-linux-file-lead_0.png
|
||||
[2]: https://opensource.com/users/don-watkins
|
||||
[3]: https://opensource.com/users/greg-p
|
||||
[4]: https://opensource.com/users/alanfdoss
|
||||
[5]: https://linuxfromscratch.org/
|
||||
[6]: https://opensource.com/users/sumantro
|
||||
[7]: https://ask.fedoraproject.org
|
||||
[8]: https://opensource.com/users/smorris12
|
||||
[9]: https://opensource.com/users/hej
|
||||
[10]: https://opensource.com/downloads/linux-common-commands-cheat-sheet
|
||||
[11]: https://opensource.com/article/22/2/why-i-love-linux-kde
|
||||
[12]: https://opensource.com/users/rcheesley
|
||||
[13]: https://opensource.com/users/peppe8o
|
||||
[14]: https://opensource.com/users/seth
|
||||
[15]: https://opensource.com/users/czanik
|
||||
[16]: https://www.redhat.com/sysadmin/run-your-own-vpn-libreswan
|
||||
[17]: https://opensource.com/article/21/8/openvpn-server-linux
|
||||
[18]: https://opensource.com/article/19/7/make-linux-stronger-firewalls
|
||||
[19]: https://opensource.com/users/greg-scott
|
||||
[20]: https://opensource.com/users/darkaxl
|
@ -1,19 +1,22 @@
|
||||
[#]: subject: "How to Install FFmpeg in Ubuntu and Other Linux"
|
||||
[#]: via: "https://www.debugpoint.com/2022/06/install-FFmpeg-ubuntu/"
|
||||
[#]: via: "https://www.debugpoint.com/2022/06/install-ffmpeg-ubuntu/"
|
||||
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
[#]: translator: "aREversez"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14716-1.html"
|
||||
|
||||
在 Ubuntu 等 Linux 发行版上安装 FFmpeg
|
||||
在 Linux 上安装 FFmpeg
|
||||
======
|
||||
本教程介绍了 FFmpeg 在 Ubuntu 及其他 Linux 发行版上的安装步骤。
|
||||
|
||||

|
||||
|
||||
> 本教程介绍了在 Ubuntu 及其他 Linux 发行版上安装 FFmpeg 的步骤。
|
||||
|
||||
FFmpeg 是一套处理多媒体文件的软件库。凭借这些强大的库,FFmpeg 能够转换格式、推流以及处理音频和视频文件。许多 Linux 的前端应用都使用 FFmpeg 作为后端支持,所以这些应用对 FFmpeg 的依赖度非常高。举个例子,录屏软件可能会用到 FFmpeg 将录屏转换为 gif 动图。
|
||||
|
||||
VLC 多媒体播放器、YouTube、Blender、Kodi、Shotcut 和 Handbrake 等流行的应用与服务都在使用 FFmpeg。
|
||||
VLC 多媒体播放器、YouTube、Blender、Kodi、Shotcut 和 Handbrake 等流行的应用与服务都在使用 FFmpeg,这仅仅一小部分。
|
||||
|
||||
趣事:NASA 火星 2020 计划的探测器“毅力”号在将图像和视频发送到地球之前,会先使用 FFmpeg 对其进行处理。
|
||||
|
||||
@ -25,9 +28,9 @@ VLC 多媒体播放器、YouTube、Blender、Kodi、Shotcut 和 Handbrake 等流
|
||||
|
||||
FFmpeg 的核心是命令行实用程序,既可在命令行上使用,也可以经由任何程序语言调用。比如,你可以在 Shell 程序或 python 脚本中使用 FFmpeg。
|
||||
|
||||
* FFmpeg: 用于转换音视频格式,包括视频直播资源。
|
||||
* ffplay: FFmpeg 配套使用的媒体播放器
|
||||
* ffprobe: 显示媒体文件信息的命令行工具,可将信息输出为 csv、xml、json 等格式。
|
||||
* `ffmpeg`:用于转换音视频格式,包括来自视频直播的信号源。
|
||||
* `ffplay`:FFmpeg 配套使用的媒体播放器
|
||||
* `ffprobe`:显示媒体文件信息的命令行工具,可将信息输出为 csv、xml、json 等格式。
|
||||
|
||||
### FFmpeg 安装
|
||||
|
||||
@ -52,49 +55,49 @@ sudo dnf install https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfre
|
||||
```
|
||||
|
||||
```
|
||||
sudo dnf install FFmpeg
|
||||
sudo dnf install ffmpeg
|
||||
```
|
||||
|
||||
#### Arch Linux
|
||||
|
||||
```
|
||||
pacman -S FFmpeg
|
||||
pacman -S ffmpeg
|
||||
```
|
||||
|
||||
安装完成后,可输入以下命令查看安装是否成功。
|
||||
|
||||
```
|
||||
FFmpeg --version
|
||||
ffmpeg --version
|
||||
```
|
||||
|
||||
![FFmpeg installed in Ubuntu Linux][3]
|
||||
|
||||
### 案例:FFmpeg 的基本操作
|
||||
### 示例:FFmpeg 的基本操作
|
||||
|
||||
首先,我们先来看看 FFmpeg 语法的一个简单例子。如下,该语法可以将 mp4 文件转换为 mkv 文件。
|
||||
|
||||
1. 视频文件格式转换
|
||||
1、视频文件格式转换
|
||||
|
||||
```
|
||||
FFmpeg -i big_buck_bunny.mp4 big_buck_bunny.mkv
|
||||
ffmpeg -i big_buck_bunny.mp4 big_buck_bunny.mkv
|
||||
```
|
||||
|
||||
当然,这种写法最为简单易懂,但它并不完整,因为没有输入 <ruby>比特率<rt>bit rate</rt></ruby>、<ruby>分辨率<rt>resolution</rt></ruby> 以及其他的视频文件属性。
|
||||
|
||||
2. 音频文件格式转换
|
||||
2、音频文件格式转换
|
||||
|
||||
第二,输入与上面相似的命令可以转换音频文件的格式。
|
||||
其次,输入与上面相似的命令可以转换音频文件的格式。
|
||||
|
||||
```
|
||||
FFmpeg -i sunny_day.ogg sunny_day.mp3
|
||||
ffmpeg -i sunny_day.ogg sunny_day.mp3
|
||||
```
|
||||
|
||||
3. 使用音视频 codec 执行格式转换
|
||||
3、使用音视频编解码器执行格式转换
|
||||
|
||||
最后,在下面的例子中,我们可以使用特定的 <ruby>编解码器<rt>codec</rt></ruby> 来转换视频格式。参数 `-c` 搭配 `a` 或者 `v`,可以分别定义音频和视频文件。以下转换命令使用 `libvpx` 视频编解码器和 `libvorbis` 音频编解码器。
|
||||
|
||||
```
|
||||
FFmpeg -i big_buck_bunny.mp4 -c:v libvpx -c:a libvorbis big_buck_bunny.webm
|
||||
ffmpeg -i big_buck_bunny.mp4 -c:v libvpx -c:a libvorbis big_buck_bunny.webm
|
||||
```
|
||||
|
||||
### 如何确定自己系统中有哪些编码器和解码器?
|
||||
@ -104,13 +107,20 @@ FFmpeg -i big_buck_bunny.mp4 -c:v libvpx -c:a libvorbis big_buck_bunny.webm
|
||||
输入以下命令,打印所有编解码器。
|
||||
|
||||
```
|
||||
FFmpeg -codecs
|
||||
ffmpeg -codecs
|
||||
```
|
||||
|
||||
该命令可以打印出所有可用的编解码器,并显示每个编解码器对应的功能信息,比如是否支持解码或编码。此外,如以下输出结果所示,打印出来的信息还会按照首字母顺序标注出每个编码器和解码器的位置。
|
||||
|
||||
```
|
||||
D..... = Decoding supported.E.... = Encoding supported..V... = Video codec..A... = Audio codec..S... = Subtitle codec...I.. = Intra frame-only codec....L. = Lossy compression.....S = Lossless compression
|
||||
D..... = 支持解码
|
||||
.E.... = 支持编码
|
||||
..V... = 视频编解码器
|
||||
..A... = 音频编解码器
|
||||
..S... = 字幕编解码器
|
||||
...I.. = 仅限帧内编解码器
|
||||
....L. = 有损压缩
|
||||
.....S = 无损压缩
|
||||
```
|
||||
|
||||
![FFmpeg Codec list][4]
|
||||
@ -120,7 +130,7 @@ D..... = Decoding supported.E.... = Encoding supported..V... = Video codec..A...
|
||||
输入下列命令,打印出所有编码器
|
||||
|
||||
```
|
||||
FFmpeg -encoders
|
||||
ffmpeg -encoders
|
||||
```
|
||||
|
||||
#### 显示所有解码器
|
||||
@ -128,7 +138,7 @@ FFmpeg -encoders
|
||||
同样,输入下列命令,打印出所有解码器。
|
||||
|
||||
```
|
||||
FFmpeg -decoders
|
||||
ffmpeg -decoders
|
||||
```
|
||||
|
||||
#### 更多信息
|
||||
@ -136,28 +146,28 @@ FFmpeg -decoders
|
||||
输入参数 `-h`,获取更多关于编码器或解码器的信息。
|
||||
|
||||
```
|
||||
FFmpeg -h decoder=mp3
|
||||
ffmpeg -h decoder=mp3
|
||||
```
|
||||
|
||||
### 总结
|
||||
|
||||
我希望这篇文章可以帮助你了解 FFmpeg 的基本知识及基本命令。若要了解更多信息,可前往 FFmpeg 官方网站,浏览 [<ruby>帮助文章<rt>Documentation</rt></ruby>][5]。
|
||||
我希望这篇文章可以帮助你了解 FFmpeg 的基本知识及基本命令。若要了解更多信息,可前往 FFmpeg 官方网站浏览 [帮助文档][5]。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.debugpoint.com/2022/06/install-FFmpeg-ubuntu/
|
||||
via: https://www.debugpoint.com/2022/06/install-ffmpeg-ubuntu/
|
||||
|
||||
作者:[Arindam][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
译者:[aREversez](https://github.com/aREversez)
|
||||
校对:[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://FFmpeg.org/
|
||||
[1]: https://ffmpeg.org/
|
||||
[2]: https://www.debugpoint.com/2020/07/enable-rpm-fusion-fedora-rhel-centos/
|
||||
[3]: https://www.debugpoint.com/wp-content/uploads/2022/06/FFmpeg-installed-in-Ubuntu-Linux.jpg
|
||||
[4]: https://www.debugpoint.com/wp-content/uploads/2022/06/FFmpeg-Codec-list.jpg
|
||||
[5]: https://FFmpeg.org/documentation.html
|
||||
[5]: https://ffmpeg.org/documentation.html
|
@ -3,15 +3,18 @@
|
||||
[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14700-1.html"
|
||||
|
||||
Amberol 是一款外观漂亮的 Linux 音乐播放器,只播放音乐,不做其他事情
|
||||
======
|
||||
|
||||

|
||||
|
||||
虽然音乐世界被流媒体服务所主导,但这并没有阻止开发者为桌面电脑创建音乐播放器。
|
||||
|
||||
最近,我发现了一个外观漂亮的新的 Linux 桌面音乐播放器。它名为 Amberol,我被它的美丽所震撼了。
|
||||
最近,我发现了一个外观漂亮的新的 Linux 桌面音乐播放器。它名为 Amberol,我被它的美丽所震撼。
|
||||
|
||||
![amberol music player interface][1]
|
||||
|
||||
@ -21,41 +24,41 @@ Amberol 是一款外观漂亮的 Linux 音乐播放器,只播放音乐,不
|
||||
|
||||
看起来不错是它所做的两件(或几件)事情中的一件。另一件事是播放音乐。
|
||||
|
||||
这就是它。[Amberol][2] 没有额外的花哨(和有用)的功能,如生成专辑封面、元数据编辑、歌词显示或播放列表和库管理。
|
||||
这就是它,[Amberol][2] 没有额外的花哨(和有用)的功能,如生成专辑封面、元数据编辑、歌词显示或播放列表和库管理。
|
||||
|
||||
这些功能也不像会在未来的版本中加入。Amberol 只想播放音乐。就是这样。
|
||||
这些功能也不像是会在未来的版本中加入。Amberol 只想播放音乐。就是这样。
|
||||
|
||||
#### 令人惊叹的用户界面
|
||||
|
||||
Amberol 和大多数新的 GNOME 应用一样,是用 Rust 和 GTK 编写的。
|
||||
|
||||
它有一个自适应的用户界面,可以根据你正在播放的专辑颜色来改变颜色。渐变效果给了它一个现代、时尚的外观,肯定会成为你的 Linux rice 截图的一部分。
|
||||
它有一个自适应的用户界面,可以根据你正在播放的专辑颜色来改变颜色。渐变效果给了它一个现代、时尚的外观,肯定会成为你的 Linux <ruby>美化<rt>Ricing</rt></ruby>截图的一部分。
|
||||
|
||||
![amberol music player][3]
|
||||
|
||||
由于 UI 没有传统的手柄和菜单,它给应用一个统一的外观。
|
||||
由于其 UI 没有传统的手柄和菜单,它给应用一个统一的外观。
|
||||
|
||||
#### 播放列表
|
||||
|
||||
它从你添加的文件夹中存在的文件自动生成一个播放列表。它显示在左手边的侧边栏。
|
||||
它会从你添加的文件夹中的文件自动生成一个播放列表,显示在左手边的侧边栏。
|
||||
|
||||
![amberol playlist][4]
|
||||
|
||||
你可以在左上角看到整个播放列表将播放多长时间的音乐。点击“勾选符号”,你可以选择歌曲,并从播放列表中删除它们。
|
||||
你可以在左上角看到整个播放列表将播放多长时间的音乐。点击“勾选”符号,你可以选择歌曲,并从播放列表中删除它们。
|
||||
|
||||
如果你愿意,你可以隐藏播放列表的侧边栏。
|
||||
如果你愿意,可以隐藏播放列表的侧边栏。
|
||||
|
||||
![amberol without playlist][5]
|
||||
|
||||
#### 音乐播放选项
|
||||
|
||||
你可以在界面上看到歌曲的进度。该播放器与键盘上的媒体控制按钮整合得很好。你可以用专用的媒体键播放/暂停和改变曲目(如果你的系统上有)。
|
||||
你可以在界面上看到歌曲的进度。该播放器与键盘上的媒体控制按钮整合得很好。你可以用专用的媒体键来播放、暂停和改变曲目(如果你的系统上有)。
|
||||
|
||||
Amberol 为你提供了一些播放音乐的选项。你可以打开随机播放功能,按随机顺序播放音乐。你也可以把一首歌放在重复的位置,一直播放,直到你厌倦它。
|
||||
Amberol 为你提供了一些播放音乐的选项。你可以打开随机播放功能,按随机顺序播放音乐。你也可以单曲循环,直到你厌倦它。
|
||||
|
||||
![amberol music playing options][6]
|
||||
|
||||
底部的手柄菜单让你可以选择添加文件或文件夹,并显示可用的键盘快捷方式。
|
||||
底部的汉堡菜单让你可以选择添加文件或文件夹,并显示可用的键盘快捷方式。
|
||||
|
||||
![amberol keyboard shortcuts][7]
|
||||
|
||||
@ -63,7 +66,7 @@ Amberol 为你提供了一些播放音乐的选项。你可以打开随机播放
|
||||
|
||||
### 在 Linux 上安装 Amberol
|
||||
|
||||
Amberol 是[以 Flatpak 形式提供][8]。请确保[你的系统已启用 Flatpak 支持][9]。
|
||||
Amberol 是 [以 Flatpak 形式提供的][8]。请确保 [你的系统已启用 Flatpak 支持][9]。
|
||||
|
||||
要安装 Amberol,请打开终端并使用以下命令:
|
||||
|
||||
@ -73,17 +76,17 @@ flatpak install flathub io.bassi.Amberol
|
||||
|
||||
安装完毕后,在菜单中搜索该应用,并点击启动。
|
||||
|
||||
第一次运行时,它会要求你添加音乐文件或文件夹。你也可以拖放文件。
|
||||
第一次运行时,它会要求你添加音乐文件或文件夹。你也可以拖放文件播放。
|
||||
|
||||
![amberol first run][10]
|
||||
|
||||
### 总结
|
||||
|
||||
就个人而言,我更喜欢流媒体服务,因为我没有一个很好的本地音乐收藏。但我知道有的人有/有大量的 CD 收藏,现在都保存在硬盘上。
|
||||
就个人而言,我更喜欢流媒体服务,因为我没有本机音乐珍藏。但我知道有的人有大量的 CD 收藏,现在都保存在硬盘上。
|
||||
|
||||
Amberol 是一个外观漂亮的应用,对于播放本地音乐来说,它足够好。最吸引人的是基于专辑封面的自适应用户界面。
|
||||
Amberol 是一个外观漂亮的应用,对于播放本机音乐来说,它足够好。最吸引人的是它基于专辑封面的自适应用户界面。
|
||||
|
||||
我请你试试它,并在评论区分享你的经验。
|
||||
请你试试它,并在评论区分享你的经验。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
@ -92,7 +95,7 @@ via: https://itsfoss.com/amberol-music-player/
|
||||
作者:[Abhishek Prakash][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
@ -0,0 +1,47 @@
|
||||
[#]: subject: "OpenInfra Foundation Launches ‘directed funding’ To Support Open Source Projects"
|
||||
[#]: via: "https://www.opensourceforu.com/2022/06/openinfra-foundation-launches-directed-funding-to-support-open-source-projects/"
|
||||
[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "lkxed"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14707-1.html"
|
||||
|
||||
OpenInfra 基金会启动“定向资助”以支持开源项目
|
||||
======
|
||||
![OpenInfra][1]
|
||||
|
||||
OpenInfra 基金会的前身为 OpenStack 基金会,几年前它将范围扩展到其旗舰项目之外,于是改了名字。2022 年 6 月 7 日,它宣布了一种有趣的新方式,让企业资助基金会内的开源项目。一般来说,开源基金会的企业成员通过支付会员费来支持该组织,然后基金会按照他们认为合适的方式分发这些费用。OpenInfra 基金会现在推出了一种新的“定向资助”模式,允许成员将他们的资金直接用于项目。
|
||||
|
||||
此前,基金会并不允许这样做,因为正如 Bryce 指出的那样,它可能会产生混合激励和付费游戏动态,而该组织一直试图避免这种情况。然而,社区对支持特定项目有很大的兴趣,这是有道理的,因为该基金会现在拥有更多种类的项目,但并不是每个成员都对每个项目进行了大量投入。
|
||||
|
||||
Bryce 表示,基金会的领导层和董事会,花费了大量时间来考虑,如何使基金会的核心原则与这种新模式相协调。因此,该模型试图将过去十年运行良好的 OpenStack/OpenInfra 技术治理模型的优点,与这些新的财务考虑相结合。
|
||||
|
||||
在这种“定向资助”模式下,每个新项目都将拥有自己的法人实体来持有项目资金。为确保新项目的合法性,OpenInfra 白金会员(目前为 9 家,包括蚂蚁集团、华为、Meta、微软和红帽)必须担任项目的发起人,之后其他组织才能加入项目基金。如果赞助公司还不是 OpenInfra 成员,则必须成为成员。然后,所有这些资助成员组成一个项目基金管理委员会,决定创建预算的费用。与此同时,OpenInfra 基金会将为这些项目提供社区建设服务。
|
||||
|
||||
这种新模式暂时只适用于加入基金会的新项目。Bryce 和 Collier 指出,组织可能会在一些现有项目中追溯应用这种新模式,但这个考虑目前不在路线图上。
|
||||
|
||||
自从将范围扩展到 OpenStack 之外后,OpenInfra 基金会增加了一些新项目,例如用于提高容器安全性的 Kata Containers、用于基础设施生命周期管理的 Airship、Startling X 边缘计算堆栈以及 Zuul CI/CD 平台。
|
||||
|
||||
“我们从每个成功的项目中学到的最重要的一点是,协作是关键,支持生态系统的范围越广越好,” OpenInfra 基金会总经理 Thierry Carrez 说,“事实上,我们发现最成功的开源项目是由多家公司资助的,因为他们能够整合资源以实现更高的回报率。”
|
||||
|
||||
这种新模式显然是 OpenInfra 基金会引入新项目和新成员的一种方式。正如领导团队欣然承认的那样,其在多方生态系统中管理开源项目的模型 —— 无论是通过新的定向资金还是更传统的方法 —— 可能并不适合每个项目。即使 OpenInfra 基金会只收到一小部分项目,随着对这些复杂云基础设施项目需求的增长,开源项目的数量也在增加,同时它们也变得更加复杂。
|
||||
|
||||
基金会还宣布了其各个项目的几个里程碑版本的发布,包括 Kata Containers 2.0 版、Zuul 5.0 版和 StarlingX 6.0 。
|
||||
|
||||
Collier 说:“基金会今年庆祝成立 10 周年,在展望下一个十年的开放基础设施之际,我们正在推动我们的模型如此成功的关键,那就是:将希望合作的公司和个人联合起来,为他们提供一个框架和有效协作的工具,并帮助他们投资资金以最好地帮助他们关心的项目。”
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.opensourceforu.com/2022/06/openinfra-foundation-launches-directed-funding-to-support-open-source-projects/
|
||||
|
||||
作者:[Laveesh Kocher][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[lkxed](https://github.com/lkxed)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.opensourceforu.com/author/laveesh-kocher/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://www.opensourceforu.com/wp-content/uploads/2022/06/open-infra-berlin-event.png
|
@ -0,0 +1,87 @@
|
||||
[#]: subject: "Cloudflare Has Something New to Replace Annoying CAPTCHAs on the Internet"
|
||||
[#]: via: "https://news.itsfoss.com/cloudflare-pat/"
|
||||
[#]: author: "Jacob Crume https://news.itsfoss.com/author/jacob/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "lkxed"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14711-1.html"
|
||||
|
||||
Cloudflare 有了一个新东西,它可以替代互联网上烦人的验证码
|
||||
======
|
||||
|
||||
不想通过正确输入 <ruby>验证码<rt>CAPTCHA</rt></ruby> 来证明自己是个人类吗?Cloudflare 可能有了一个解决方案。
|
||||
|
||||
![Cloudflare][1]
|
||||
|
||||
互联网服务巨头 Cloudflare 前两天 [宣布了][2] <ruby>私有访问令牌<rt>Private Access Tokens</rt></ruby> 功能。这项功能旨在减少你在网络上看到的验证码数量,同时改善你的隐私。
|
||||
|
||||
你可能已经发现,验证码在移动设备上是一种可怕的体验。通常,它们会最终会占据整个屏幕,有时甚至无法完成。
|
||||
|
||||
作为替代方案,网站可以选择收集唯一识别数据,以证明你是人类。当然,从隐私的角度来看,这种做法是很糟糕的。如果这么做,许多重视隐私的公司都几乎无法避免他们受到 <ruby>僵尸攻击<rt>bot attacks</rt></ruby>。
|
||||
|
||||
幸运的是,私有访问令牌(PAT)的发布将改变这一点。
|
||||
|
||||
### 私有访问令牌会产生什么影响?
|
||||
|
||||
简而言之,私有访问令牌能够做到下面这些事:
|
||||
|
||||
* 在支持的设备上减少验证码数量
|
||||
* 增强用户隐私
|
||||
* 允许网站所有者确保访问者来自真实设备
|
||||
|
||||
然而,深入观察,我们可以看到私有访问令牌的影响力远不止于此。若使用传统的验证码,就有多个实体可以访问你的数据。
|
||||
|
||||
首先,你正在访问的网站知道你的 IP 地址和你正在访问的 URL。当然,这些数据是建立连接所需的最低要求。此外,对于更高级的功能,网站还会发送一些用户代理(UA)数据,还好这些数据并不是唯一可识别的。
|
||||
|
||||
然而,另一方,也就是验证码提供者,却可以收集更多的数据。与你要访问的网站一样,它也知道你的 IP 地址、用户代理数据和你访问的 URL。不幸的是,除此之外,他们还会收集其他数据,例如你的设备信息和交互数据。如果把这些信息,与你之前完成验证码的时间联系起来,你就会惊讶的发现,他们可以建立一个非常详细的属于你的个人资料。
|
||||
|
||||
幸运的是,有了 Cloudflare 的私有访问令牌,你就可以完全绕过验证码,从而阻止验证码提供者收集此类数据。
|
||||
|
||||
### 私有访问令牌是如何工作的?
|
||||
|
||||
![][3]
|
||||
|
||||
验证码的理念是集中尽可能多的数据,私人访问令牌则恰恰相反,它将数据去中心化,因此任何一方都无法唯一识别你。在你提到数据共享之前,Cloudflare 就已经特别指出了,数据不会在各方之间共享。
|
||||
|
||||
当你访问使用 Cloudflare 和私人访问令牌的网站的时候,共有三方将处理你的数据的不同部分。
|
||||
|
||||
1. 网站。它只会知道你的 IP、URL 和用户代理,这也是建立连接所必需的。
|
||||
2. 你的设备制造商。他们只会知道那些用于验证设备是否真实所需的设备数据,而不会知道你正在访问哪个网站,或你的 IP 地址是什么。验证了你的设备后,他们将生成一个令牌,该令牌将发送到 Cloudflare。
|
||||
3. Cloudflare。他们将收到这个令牌,令牌中不包含你的任何设备数据,只有制造商对它是正品的“保证”。他们知道的唯一其他数据,就是你正在访问的网站,同样,这是为你提供内容所必需的。
|
||||
|
||||
通过这种方式,Cloudflare 无需接触你的数据,就可以对“你是一个人”充满信心。
|
||||
|
||||
### 支持的操作系统:没有 Linux?
|
||||
|
||||
你可能已经意识到,私人访问令牌需要特定的操作系统功能才能工作。目前,它们仅存在于苹果最新的操作系统上,即 iOS 和 iPadOS 16,以及 macOS Ventura。这是因为苹果的操作系统只在有限的硬件上运行,设备验证会更加容易。
|
||||
|
||||
另一方面,Linux 是一种通用操作系统,旨在在各种硬件上运行。因此,我认为,在可预见的未来,它都不会支持私人访问令牌。
|
||||
|
||||
回到苹果,我想到私人访问令牌也可能导致消费者维修设备的权利出现一些问题。例如,如果我用第三方的非正品电池更换了老旧的 iPhone 原装电池,私人访问令牌系统会特殊对待这种情况吗?
|
||||
|
||||
如果是 Linux 手机呢?这些制造商,如 Pine64 和 Purism,可能没有支持这样一个系统的基础设施。是否可以在这些上使用私人访问令牌呢?
|
||||
|
||||
Cloudflare 在 [公告][4] 中提到:
|
||||
|
||||
> 我们正在积极努力让其他客户和设备制造商也使用私人访问令牌框架。每当新客户开始使用它时,从该客户进入你网站的流量将自动开始要求令牌,你的访问者将自动看到更少的验证码。
|
||||
|
||||
因此,我们希望看到它被更多的设备和操作系统采用。你如何看待 Cloudflare 的私人访问令牌呢?在下面的评论中发表你的看法吧!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://news.itsfoss.com/cloudflare-pat/
|
||||
|
||||
作者:[Jacob Crume][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[lkxed](https://github.com/lkxed)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://news.itsfoss.com/author/jacob/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://news.itsfoss.com/wp-content/uploads/2022/06/cloudflare-private-access-tokens.jpg
|
||||
[2]: https://blog.cloudflare.com/eliminating-captchas-on-iphones-and-macs-using-new-standard/
|
||||
[3]: https://news.itsfoss.com/wp-content/uploads/2022/06/PAT-Data-transfer-chart-1024x650.png
|
||||
[4]: https://blog.cloudflare.com/eliminating-captchas-on-iphones-and-macs-using-new-standard/
|
@ -0,0 +1,128 @@
|
||||
[#]: subject: "Thonny is an Ideal IDE for Teaching Python Programming in Schools"
|
||||
[#]: via: "https://itsfoss.com/thonny-python-ide/"
|
||||
[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14717-1.html"
|
||||
|
||||
Thonny:在学校教授 Python 编程的理想 IDE
|
||||
======
|
||||
|
||||
在 Linux 中运行一个 Python 程序只需要简单地在终端中执行 Python 文件就行。
|
||||
|
||||
但这对人们来说不是很方便,也不能帮助你调试你的程序。太原始了。
|
||||
|
||||
有几个 IDE 和文本编辑器可以用于 Python 开发。Linux 用户可以使用 [PyCharm 社区版][1]。
|
||||
|
||||
我最近发现了另一个专门为 Python 初学者制作的 IDE。我喜欢这个应用的想法,因此我在这里与你分享。
|
||||
|
||||
### Thonny 是一个跨平台、开源的 Python IDE,适合初学者使用
|
||||
|
||||
[Thonny][2] 在用户界面和用户体验方面,感觉就像 Python 版本的 Eclipse。考虑到大多数 C++ 和 Java 的初学者都是从 Eclipse 开始的,而且许多人后来一直使用它,这也不完全是一件坏事。
|
||||
|
||||
它不是一个新的工具。它已经出现好几年了。我没有用 Python 进行编码,所以直到最近才发现它。
|
||||
|
||||
Thonny 专注于 Python,提供了帮助 Python 初学者了解其程序行为的功能。让我们来看看这些功能。
|
||||
|
||||
#### 即装即用
|
||||
|
||||
Thonny 自带 Python,所以你不需要为安装 Python 做额外的努力。这对 Linux 用户来说不是什么大事,因为大多数发行版都默认安装了 Python。
|
||||
|
||||
界面很简单。它给你一个编辑器,你可以写你的 Python 程序,然后点击运行按钮或使用 `F5` 键来运行程序。输出显示在底部。
|
||||
|
||||
![thonny hello world][3]
|
||||
|
||||
#### 查看变量
|
||||
|
||||
在 “<ruby>查看<rt>View</rt></ruby>-><ruby>变量<rt>Variables</rt></ruby>”,你可以看到所有变量的值。不需要将它们全部打印出来。
|
||||
|
||||
![thonny variable pane][4]
|
||||
|
||||
#### 内置调试器
|
||||
|
||||
通过使用调试器一步步运行你的程序。你可以从顶部的菜单或使用 `Ctrl + F5` 键访问它。在这里你甚至不需要设置断点。你可以用 `F6` 进入大步骤,或用 `F7` 进入小步骤。
|
||||
|
||||
![thonny step by step f6][5]
|
||||
|
||||
在小步骤中,你可以看到 Python 是如何看待你的表达式的。这对新的程序员理解他们的程序为什么以某种方式表现非常有帮助。
|
||||
|
||||
![thonny step by step f7][6]
|
||||
|
||||
不止这样。对于函数调用,它会打开一个新的窗口,里面有独立的局部变量表和代码指针。超级酷!
|
||||
|
||||
#### 语法错误高亮
|
||||
|
||||
初学者经常会犯一些简单的语法错误,如缺少小括号、引号等。Thonny 会在编辑器中立即指出来。
|
||||
|
||||
本地变量也可以从视觉上与全局变量区分开来。
|
||||
|
||||
#### 自动补全
|
||||
|
||||
你不需要输入所有的东西。Thonny 支持自动补全代码,这有助于加快编码。
|
||||
|
||||
![thonny auto complete][7]
|
||||
|
||||
#### 访问系统 shell
|
||||
|
||||
在工具中,你可以访问系统 shell。在这里你可以安装新的 Python 包或学习从命令行处理 Python。
|
||||
|
||||
![thonny shell terminal][8]
|
||||
|
||||
请注意,如果你使用 Flatpak 或 Snap,Thonny 可能无法访问系统 shell。
|
||||
|
||||
#### 从 GUI 管理 Pip
|
||||
|
||||
进入工具和管理包。它会打开一个窗口,你可以从这个 GUI 中安装 Pip 软件包。
|
||||
|
||||
![thonny manage packages][9]
|
||||
|
||||
对于学习 Python 来说,功能足够好,对吗?让我们看看如何安装它。
|
||||
|
||||
### 在 Linux 上安装 Thonny
|
||||
|
||||
Thonny 是一个跨平台的应用。它可用于 Windows、macOS 和 Linux。
|
||||
|
||||
它是一个流行的应用,你可以在大多数 Linux 发行版的仓库中找到它。只要在你的系统的软件中心寻找它。
|
||||
|
||||
另外,你也可以随时使用你的 Linux 发行版的包管理器。
|
||||
|
||||
在 Debian 和基于 Ubuntu 的发行版上,你可以使用 `apt` 命令来安装它。
|
||||
|
||||
```
|
||||
sudo apt install thonny
|
||||
```
|
||||
|
||||
它会下载一堆依赖关系和大约 300MB 的软件包。
|
||||
|
||||
安装后,你可以在菜单中搜索它,并从那里安装它。
|
||||
|
||||
### 总结
|
||||
|
||||
Thonny 对于初级 Python 程序员来说是个不错的工具。不是说专家不能使用它,但它更适合在学校和学院使用。学生们会发现它有助于学习 Python 和理解他们的代码是如何以某种方式表现出来的。事实上,它最初是在爱沙尼亚的塔尔图大学开发的。
|
||||
|
||||
总的来说,对于 Python 学习者来说是一个很好的软件。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/thonny-python-ide/
|
||||
|
||||
作者:[Abhishek Prakash][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://itsfoss.com/author/abhishek/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://itsfoss.com/install-pycharm-ubuntu/
|
||||
[2]: https://thonny.org/
|
||||
[3]: https://itsfoss.com/wp-content/uploads/2022/06/thonny-hello-world.png
|
||||
[4]: https://itsfoss.com/wp-content/uploads/2022/06/thonny-variable-pane.png
|
||||
[5]: https://itsfoss.com/wp-content/uploads/2022/06/thonny-step-by-step-f6.png
|
||||
[6]: https://itsfoss.com/wp-content/uploads/2022/06/thonny-step-by-step-f7.png
|
||||
[7]: https://itsfoss.com/wp-content/uploads/2022/06/thonny-auto-complete.png
|
||||
[8]: https://itsfoss.com/wp-content/uploads/2022/06/thonny-shell-terminal.png
|
||||
[9]: https://itsfoss.com/wp-content/uploads/2022/06/thonny-manage-packages.png
|
@ -0,0 +1,38 @@
|
||||
[#]: subject: "Thunderbird, The Open Source Email Client, Is Coming To Android"
|
||||
[#]: via: "https://www.opensourceforu.com/2022/06/thunderbird-the-open-source-email-client-is-coming-to-android/"
|
||||
[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "lkxed"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14715-1.html"
|
||||
|
||||
开源电子邮件客户端 Thunderbird 即将登陆 Android
|
||||
======
|
||||
|
||||

|
||||
|
||||
开源电子邮件客户端 Thunderbird 将通过 K-9 Mail Android 电子邮件应用项目登陆 Android,该项目与 Thunderbird 合并后的产品就是 Thunderbird Android 电子邮件应用。两年前,Thunderbird 被转移到了 Mozilla 基金会的子公司 MZLA Technologies Corporation 下,该公司的所有权结构与基金会子公司 Mozilla 公司旗下的 Firefox 类似。有了 OpenPGP 端到端加密和期待已久的移动应用等新功能,Thunderbird 项目能够开辟出一条自己的道路。
|
||||
|
||||
根据 Thunderbird 团队的说法,Thunderbird 产品经理 Ryan Lee Sipes 和 K-9 的主要维护者 Christian Ketterer,两人早在 2018 年就开始讨论可能的 Thunderbird 电子邮件应用合作了。到了 2022 年,两人决定不再让 Thunderbird 从头开始开发自己的应用程序,而是直接让 K-9 加入 Thunderbird。
|
||||
|
||||
Thunderbird 团队表示:“许多 Thunderbird 用户都要求在移动设备上获得 Thunderbird 体验,我们打算通过把 K-9 打造成令人惊叹的产品(并将其变成 Android 上的 Thunderbird)来提供这种体验。K-9 将补充提供 Thunderbird 体验,并增强它的使用场景和方式,让用户获得出色的电子邮件体验。我们对桌面 Thunderbird 的承诺没有改变,我们团队中的大多数人都致力于将其打造为一流的电子邮件客户端,并将保持这种状态。”
|
||||
|
||||
虽然 K-9 在 Google Play 上并不是特别受欢迎的电子邮件应用,但它已经获得了 500 万次下载。K-9 Mail 的路线图目前包括:使用 Thunderbird 帐户自动配置的帐户设置、改进的文件夹管理、消息过滤器支持,以及桌面和移动 Thunderbird 之间的同步。虽然 Thunderbird 知道人们对 iOS 版 Thunderbird 应用程序也很感兴趣,但在常见问题解答(FAQ)中,该项目仅声明它正在“评估”这种可能性。
|
||||
|
||||
Thunderbird 团队还打算将 Firefox Sync 作为一种在 Thunderbird 和 K-9 Mail 之间同步帐户的方法。它应该会在 2023 年夏天正式投入使用。该项目还在研究将哪些 Thunderbird 功能引入 Android 应用程序,例如日历、任务、提要和聊天支持等。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.opensourceforu.com/2022/06/thunderbird-the-open-source-email-client-is-coming-to-android/
|
||||
|
||||
作者:[Laveesh Kocher][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[lkxed](https://github.com/lkxed)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.opensourceforu.com/author/laveesh-kocher/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://www.opensourceforu.com/wp-content/uploads/2022/06/android-developer.jpg
|
@ -1,47 +0,0 @@
|
||||
[#]: subject: "OpenInfra Foundation Launches ‘directed funding’ To Support Open Source Projects"
|
||||
[#]: via: "https://www.opensourceforu.com/2022/06/openinfra-foundation-launches-directed-funding-to-support-open-source-projects/"
|
||||
[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
OpenInfra Foundation Launches ‘directed funding’ To Support Open Source Projects
|
||||
======
|
||||
![open-infra-berlin-event][1]
|
||||
|
||||
The OpenInfra Foundation, formerly known as the OpenStack Foundation until it expanded its scope beyond its flagship project a few years ago, announced today an intriguing new way for companies to fund open source projects within the foundation. Corporate members of open source foundations have traditionally supported the organisation by paying a membership fee, which the foundations then distribute as they see fit. The OpenInfra foundation is now launching a new ‘Directed Funding’ model that allows members to direct their funds directly to a project.
|
||||
|
||||
The foundation previously did not allow this because, as Bryce pointed out, it can create mixed incentives and a pay-for-play dynamic, which the organisation has always tried to avoid. However, there was a lot of interest in the community to support specific projects, which makes sense given that the foundation is now home to a wider variety of projects, but not every member is heavily invested in every project.
|
||||
|
||||
Bryce stated that the foundation’s leadership and board spent a significant amount of time considering how to reconcile the foundation’s core principles with this new model. As a result, the model tries to combine the best of the OpenStack/OpenInfra technical governance model, which has worked well over the last decade, with these new financial considerations.
|
||||
|
||||
Under this ‘directed funding’ model, each new project will have its own legal entity that will hold the project funding. To ensure that the new projects are legitimate, an OpenInfra Platinum member (currently nine, including Ant Group, Huawei, Meta, Microsoft, and Red Hat) must serve as the project’s sponsor, after which other organisations can join the project fund. If a sponsoring company is not already an OpenInfra member, it must become one. All of these funding members then form a project fund governing board, which decides on the fees for creating a budget. Meanwhile, the OpenInfra Foundation will provide these projects with community-building services.
|
||||
|
||||
This new model will, for the time being, only apply to new projects that join the foundation. Bryce and Collier noted that there may be some existing projects where the organisation could retroactively apply this new model, but that is not currently on the roadmap.
|
||||
|
||||
The OpenInfra foundation has added projects such as Kata Containers for increased container security, Airship for infrastructure lifecycle management, the Startling X edge compute stack, and the Zuul CI/CD platform since it expanded beyond OpenStack.
|
||||
|
||||
“The most important thing we’ve learned from each of these successful projects is that collaboration is key and the more breadth in the ecosystem of support the better,” said Thierry Carrez, general manager of the OpenInfra Foundation. “In fact, we’ve found that the most successful open source projects are funded by multiple companies, because they are able to combine their resources to achieve a much stronger rate of return.”
|
||||
|
||||
This new model is clearly a way for the OpenInfra Foundation to bring new projects — and new members — into the fold. Its models for managing open source projects in a multi-party ecosystem — both through the new directed funds and its more traditional approach — may not be suitable for every project, as the leadership team readily admits. Even if the OpenInfra Foundation only receives a small percentage of projects, the number of open-source projects is increasing as the demand for these sophisticated cloud infrastructure projects grows, all while they become more complex.
|
||||
|
||||
The Foundation also announced a couple of milestone releases for its various projects, including version 2.0 of Kata Containers, version 5.0 of Zuul, and the release of StarlingX 6.0.
|
||||
|
||||
“The Foundation celebrates its 10 anniversary this year, and as we look to our next decade of open infrastructure, we’re building momentum on what makes our model so successful: aligning companies and individuals who wish to work together, providing them with a framework and tools to effectively collaborate, and helping them invest their funds to best help the project they care about,” said Collier.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.opensourceforu.com/2022/06/openinfra-foundation-launches-directed-funding-to-support-open-source-projects/
|
||||
|
||||
作者:[Laveesh Kocher][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.opensourceforu.com/author/laveesh-kocher/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://www.opensourceforu.com/wp-content/uploads/2022/06/open-infra-berlin-event.png
|
@ -1,86 +0,0 @@
|
||||
[#]: subject: "Cloudflare Has Something New to Replace Annoying CAPTCHAs on the Internet"
|
||||
[#]: via: "https://news.itsfoss.com/cloudflare-pat/"
|
||||
[#]: author: "Jacob Crume https://news.itsfoss.com/author/jacob/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Cloudflare Has Something New to Replace Annoying CAPTCHAs on the Internet
|
||||
======
|
||||
Don’t want to complete CAPTCHA challenges to prove that you are a human? Cloudflare might have a solution for that.
|
||||
|
||||
![cloudflare][1]
|
||||
|
||||
Cloudflare, the internet services giant, has [just announced][2] Private Access Tokens. These aim to reduce the number of CAPTCHAs you see on the web while improving your privacy.
|
||||
|
||||
As you may have found out, CAPTCHAs are a horrible experience on mobile. They often end up occupying the entire screen and can be impossible to complete at times.
|
||||
|
||||
As an alternative, websites can elect to collect uniquely identifying data to prove that you are a human. Of course, from a privacy standpoint, this practice is terrible, leaving many privacy-valuing companies with little to prevent them from bot attacks.
|
||||
|
||||
Fortunately, the release of Private Access Tokens, or PATs, is set to change this.
|
||||
|
||||
### What Impact Will Private Access Tokens Have?
|
||||
|
||||
In short, PATs will:
|
||||
|
||||
* Reduce the number of CAPTCHAs on supported devices
|
||||
* Increase user privacy
|
||||
* Allow website owners to ensure that visitors are coming from actual devices
|
||||
|
||||
However, diving in a little deeper, we can see that PATs are much more impactful than at first glance. With traditional CAPTCHAs, there are multiple entities that can access your data.
|
||||
|
||||
Firstly, the website you are visiting knows your IP address and the URL you are visiting. Of course, this data is the minimum required to establish a connection. Additionally, for more advanced functionality, websites are also sent some user agent data, which is not uniquely identifiable.
|
||||
|
||||
However, the second party, the CAPTCHA provider, can collect a lot more data. Like with the website you want to visit, it knows your IP address, user agent data, and the URL you visit. Unfortunately, they also collect additional data, like your device information and interaction data. When tied back with previous times you have completed a CAPTCHA, they can build up an astonishingly detailed profile of you.
|
||||
|
||||
Fortunately, PATs by Cloudflare prevent such data from being collected, by ultimately bypassing the CAPTCHA altogether.
|
||||
|
||||
### How Do PATs Work?
|
||||
|
||||
![][3]
|
||||
|
||||
Unlike the CAPTCHA method of aggregating as much data as possible, PATs decentralize the data so that no single party can uniquely identify you. Before you mention data sharing, Cloudflare has specifically mentioned that data is not shared between parties.
|
||||
|
||||
When you go on to a website utilizing Cloudflare and PATs, a total of three parties will handle different portions of your data.
|
||||
|
||||
1. The website. This will only know your IP, URL, and user agent, which again, is required for establishing a connection.
|
||||
2. Your device manufacturer. This will only know the device data required to verify that your device is genuine. They will NOT know what website you are visiting, or your IP address. After verifying your device, they will generate a token, which will be sent to Cloudflare.
|
||||
3. Cloudflare. Cloudflare will receive the token, which does not contain any of your device data, only a ‘guarantee’ of sorts from the manufacturer that it is genuine. The only other data they know is the website you are visiting, which is required to serve you the content.
|
||||
|
||||
The result of this is a system that gives Cloudflare confidence in you being a human, without ever having to touch your data.
|
||||
|
||||
### Supported Operating Systems: No Linux?
|
||||
|
||||
As you may have realized, PATs need specific operating system features to work. Currently, they are only present on the latest operating systems by Apple, namely iOS and iPadOS 16, as well as macOS Ventura. This is because Apple’s operating systems run on a limited set of hardware, making device verification significantly easier.
|
||||
|
||||
Linux, on the other hand, is a general-purpose operating system designed to run on a wide range of hardware. As a result, I don’t expect to see it support PATs in the near future.
|
||||
|
||||
Going back to Apple, it occurs to me that PATs could also cause some issues with consumers’ right to repair their devices. If, for example, I replaced a worn-out iPhone battery with a non-genuine one, would this be flagged by the PAT system?
|
||||
|
||||
What about Linux Phones? Manufacturers of these, like Pine64 and Purism, may not have the infrastructure to support such a system. Will it be possible to use PATs on these?
|
||||
|
||||
In the [announcement post][4], Cloudflare mentions:
|
||||
|
||||
> We are actively working to get other clients and device makers utilizing the PAT framework as well. Any time a new client begins utilizing the PAT framework, traffic coming to your site from that client will automatically start asking for tokens, and your visitors will automatically see fewer CAPTCHAs.
|
||||
|
||||
So, we hope to see it being adopted by more devices, and operating systems. What do you think about PATs by Cloudflare? Let me know your thoughts in the comments down below.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://news.itsfoss.com/cloudflare-pat/
|
||||
|
||||
作者:[Jacob Crume][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/jacob/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://news.itsfoss.com/wp-content/uploads/2022/06/cloudflare-private-access-tokens.jpg
|
||||
[2]: https://blog.cloudflare.com/eliminating-captchas-on-iphones-and-macs-using-new-standard/
|
||||
[3]: https://news.itsfoss.com/wp-content/uploads/2022/06/PAT-Data-transfer-chart-1024x650.png
|
||||
[4]: https://blog.cloudflare.com/eliminating-captchas-on-iphones-and-macs-using-new-standard/
|
@ -1,80 +0,0 @@
|
||||
[#]: subject: "To Favor Microsoft VS Code, Microsoft’s GitHub is Killing GitHub’s Atom Editor"
|
||||
[#]: via: "https://news.itsfoss.com/atom-being-discontinued/"
|
||||
[#]: author: "Abhishek https://news.itsfoss.com/author/root/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
To Favor Microsoft VS Code, Microsoft’s GitHub is Killing GitHub’s Atom Editor
|
||||
======
|
||||
We all knew this day would be coming sooner or later.
|
||||
|
||||
![Microsoft kills GitHub's Atom][1]
|
||||
|
||||
Coder, coder in the hall, which is the best editor of them all!
|
||||
|
||||
Sorry for the really cheesy opening line. I could not prevent myself from writing that. Just as we all could not prevent the certain demise of the most loved open source code editor of the last decade, Atom.
|
||||
|
||||
### A brief history of Atom
|
||||
|
||||
Atom, released in 2014 by the then independent Git Hub team, was a huge hit among the programmers.
|
||||
|
||||
Its neat UI, features, and numerous add-ons made it the hot favorite of the developers.
|
||||
|
||||
It continued its popular run despite getting tough competition from Microsoft’s recently open-sourced VS Code editor.
|
||||
|
||||
Atom’s loyal fanbase didn’t budge despite the rising popularity of the VS Code until[Microsoft acquired GitHub in 2018][2].
|
||||
|
||||
People started wondering how long will Microsoft continue developing two similar projects that don’t make any money for it directly.
|
||||
|
||||
In the last four years, it did seem that Atom was losing its charm. It didn’t have any significant feature development while VS Code got more attractive as features after features landed in every release.
|
||||
|
||||
The writing was on the wall. Microsoft branded VS Code was being favored over Atom.
|
||||
|
||||
Though I don’t have any stats to back my claim, it did seem that Atom’s userbase was declining in the last couple of years. VS Code is like the default editor for young developers.
|
||||
|
||||
It was only time that Microsoft pulled the plug on Atom and it did that finally.
|
||||
|
||||
### GitHub discontinues Atom
|
||||
|
||||
On June 8, Microsoft-owned GitHub [announced][3] that it is going to archive the entire Atom project on December 15, 2022.
|
||||
|
||||
> …we’ve decided to retire Atom in order to further our commitment to bringing fast and reliable software development to the cloud via Microsoft Visual Studio Code and GitHub Codespaces.
|
||||
|
||||
The stated reason is the same we all know; “Atom has not had significant feature development for the past several years” and “focus on enhancing the developer experience in the cloud with GitHub Codespaces”.
|
||||
|
||||
The Atom project was more than just an editor though. For good or bad, whatever you feel like, Atom also gave birth to Electron framework.
|
||||
|
||||
> It’s worth reflecting that Atom has served as the foundation for the Electron framework, which paved the way for the creation of thousands of apps, including Microsoft Visual Studio Code, Slack, and our very own GitHub Desktop. However, reliability, security, and performance are core to GitHub, and in order to best serve the developer community, we are archiving Atom to prioritize technologies that enable the future of software development.
|
||||
|
||||
### Atom dies a slow death and its fork will likely meet the same fate
|
||||
|
||||
Atom is open source so it’s not going to ‘rest in peace’ immediately. It will be resurrected (read forked) for sure.
|
||||
|
||||
However, even if someone forks the project and continues to keep it alive, it’s not going to match up to VS Code anymore. At best, it will get a few bug fixes and minor new features. That’s not entirely bad for the hard-core Atom lovers but it won’t attract newer, younger coders.
|
||||
|
||||
Ultimately, the forked projects will also be shut down eventually. It’s not possible for a couple of volunteer developers to match the might of a billion-dollar organization with huge infrastructure. [Atom won’t get compared to VS Code][4] any longer.
|
||||
|
||||
Atom will be missed. Maybe not by as many people as it would have been if it was to discontinue in 2018. The noose was tightened around its neck slowly and we all witnessed it.
|
||||
|
||||
Anyway, are you still using Atom? Will you move to VS Code or choose some other non-Microsoft editor?
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://news.itsfoss.com/atom-being-discontinued/
|
||||
|
||||
作者:[Abhishek][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/root/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://news.itsfoss.com/wp-content/uploads/2022/06/microsoft-kills-github-atom.png
|
||||
[2]: https://itsfoss.com/microsoft-github/
|
||||
[3]: https://github.blog/2022-06-08-sunsetting-atom/
|
||||
[4]: https://itsfoss.com/visual-studio-code-vs-atom/
|
@ -0,0 +1,39 @@
|
||||
[#]: subject: "According to studies, Twitter Drives Open Source Projects Popularity"
|
||||
[#]: via: "https://www.opensourceforu.com/2022/06/according-to-studies-twitter-drives-open-source-projects-popularity/"
|
||||
[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
According to studies, Twitter Drives Open Source Projects Popularity
|
||||
======
|
||||
![twiiter][1]
|
||||
|
||||
The research team, led by Ph.D. Hongbo Fang, discovered that Twitter is an effective way to attract more attention and contributors to open source projects on GitHub. The study, titled “‘This Is Damn Slick!’ Estimating the Impact of Tweets on Open Source Project Popularity and New Contributors,” was presented by Fang at the International Conference on Software Engineering, where it received a Distinguished Paper award. According to the study, tweeting about a project resulted in a 7% increase in popularity (at least one star on GitHub) and a 2% increase in the number of contributors. The more tweets a project received, the more stars and contributors it received.
|
||||
|
||||
“We have realized that social media has become more and more important in open source communities,” Fang said. “Attracting attention and new contributors will lead to higher quality and better software.”
|
||||
|
||||
The majority of open source software is created and maintained by volunteers. The more people who work on a project, the better the outcome. Developers and others use the software, report problems, and work to resolve them. Projects that are unpopular risk not receiving the attention they require. This mostly volunteer workforce is responsible for the upkeep of software that millions of people rely on every day. For example, nearly every HTTPS website secures its content with the open source OpenSSL. Heartbleed, a security flaw discovered in OpenSSL, cost businesses millions of dollars to fix after it was discovered in 2014. Another open source piece of software, cURL, allows connected devices to send data to one another and is installed on approximately 1 billion devices. The list could go on and on.
|
||||
|
||||
Fang’s study of Twitter’s impact on increasing the popularity of an open-source project and attracting new contributors is part of a larger body of work in Vasilescu’s Socio-Technical Research Using Data Excavation Lab (STRUDEL) that looks at how to make the open source community and its work more sustainable. The digital infrastructure, the roads and bridges that underpin modern technology, is open source software. That infrastructure may crumble if it is not properly maintained.
|
||||
|
||||
The researchers examined 44,544 tweets containing links to 2,370 open source GitHub repositories for evidence that the tweets drew new stars and contributors to the projects. The researchers used a scientific approach to the study, comparing the increase in stars and contributors of GitHub projects mentioned on Twitter to a control group of projects that were not mentioned on Twitter. The study also described the characteristics of high-impact tweets, the types of people who are likely to be drawn to a project by the posts, and how those people differ from contributors drawn through other means. Tweets from project supporters, rather than developers, work best for attracting attention. Posts requesting assistance with a specific task or project receive a higher response rate. Tweets tend to attract new contributors who are newer to GitHub but not less experienced programmers. And new interest may not result in new assistance.
|
||||
|
||||
One of the potential drawbacks of increasing a project’s popularity that the researchers discuss is the gap between attention and action. More attention frequently results in more feature requests or issue reports, but not necessarily more developers to address them. Increased social media popularity may result in more trolls or toxic behaviour surrounding the project.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.opensourceforu.com/2022/06/according-to-studies-twitter-drives-open-source-projects-popularity/
|
||||
|
||||
作者:[Laveesh Kocher][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.opensourceforu.com/author/laveesh-kocher/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://www.opensourceforu.com/wp-content/uploads/2022/06/twiiter.jpg
|
@ -0,0 +1,76 @@
|
||||
[#]: subject: "Mozilla Just Made Firefox the Most Secure Web Browser for All Users"
|
||||
[#]: via: "https://news.itsfoss.com/mozilla-firefox-secure/"
|
||||
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Mozilla Just Made Firefox the Most Secure Web Browser for All Users
|
||||
======
|
||||
Mozilla finally enabled a privacy protection feature that potentially makes it the safest web browser at the time. Do you think so?
|
||||
|
||||
![mozilla firefox][1]
|
||||
|
||||
Mozilla Firefox is one of the most secure open-source web browsers available.
|
||||
|
||||
Undoubtedly, you get the freedom to customize it to harden security, which is why Tor Browser utilizes Firefox at its core.
|
||||
|
||||
And, also one of the [reasons why I keep coming back to Firefox][2].
|
||||
|
||||
Now, Mozilla has finally enabled a new feature for **all desktop users,** making it the most secure browser (or as they claim).
|
||||
|
||||
Here, I’m not talking about anything new, but an existing feature in Firefox, i.e., Total Cookie Protection. It was introduced with [Firefox 86][3] last year, but it was not enabled by default for all users.
|
||||
|
||||
### Total Cookie Protection for all users
|
||||
|
||||
Whether you are using Windows, Mac, or Linux, the Total Cookie Protection is being rolled out to everyone, making it one of its core features enabled by default.
|
||||
|
||||
Initially, to use the feature, you had to enable the strict mode (Enhanced Tracking Protection). But, now, you no longer need to do that.
|
||||
|
||||
**What is it?**
|
||||
|
||||
In case you are curious, Total Cookie Protection isolates every website with its cookies. Cookies are small bits of data sent to your browser by a website.
|
||||
|
||||
So, the cookies will not be shared among websites, thereby, preventing cross-site tracking.
|
||||
|
||||
Separate cookie jars will be created for each website you visit.
|
||||
|
||||
![][4]
|
||||
|
||||
Mozilla’s blog post explains more about it as:
|
||||
|
||||
> Any time a website, or [third-party content][5] embedded in a website, deposits a cookie in your browser, that cookie is confined to the cookie jar assigned to *only*that website. No other websites can reach into the cookie jars that don’t belong to them and find out what the other websites’ cookies know about you — giving you freedom from invasive ads and reducing the amount of information companies gather about you.
|
||||
|
||||
### So, Is it a big deal?
|
||||
|
||||
Even with all the privacy tracking protection and content blockers in place, cross-site tracking is a problem that not everyone is aware of.
|
||||
|
||||
Hence, with cross-site cookie interactions, a lot of your personal activities and habits can help a digital tracking company build an online profile of yours.
|
||||
|
||||
But, with Mozilla Firefox, enabling the feature by default on top of all other privacy measures by Firefox, ensures that you should get the most private experience.
|
||||
|
||||
And, all that without needing to tweak anything, which should make things convenient for any privacy-centric user.
|
||||
|
||||
If you are still curious, you can refer to the [official announcement post][6] by Mozilla.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://news.itsfoss.com/mozilla-firefox-secure/
|
||||
|
||||
作者:[Ankush Das][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://news.itsfoss.com/author/ankush/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://news.itsfoss.com/wp-content/uploads/2022/06/mozilla-made-firefox-most-secure-web-browser.jpg
|
||||
[2]: https://news.itsfoss.com/why-mozilla-firefox/
|
||||
[3]: https://news.itsfoss.com/firefox-86-release/
|
||||
[4]: https://news.itsfoss.com/wp-content/uploads/2021/02/tcp-firefox.png
|
||||
[5]: https://support.mozilla.org/en-US/kb/third-party-cookies-firefox-tracking-protection#:~:text=Third%2Dparty%20cookies%20are%20cookies,considered%20a%20third%2Dparty%20cookie.
|
||||
[6]: https://blog.mozilla.org/en/products/firefox/firefox-rolls-out-total-cookie-protection-by-default-to-all-users-worldwide/
|
@ -2,7 +2,7 @@
|
||||
[#]: via: "https://opensource.com/article/22/5/first-open-source-contribution-libreoffice"
|
||||
[#]: author: "Klaatu https://opensource.com/users/klaatu"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "lkskjjk"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
@ -1,128 +0,0 @@
|
||||
[#]: subject: "Why Do Enterprises Use and Contribute to Open Source Software"
|
||||
[#]: via: "https://www.linux.com/news/why-do-enterprises-use-and-contribute-to-open-source-software/"
|
||||
[#]: author: "Dan Whiting https://www.linuxfoundation.org/blog/why-do-enterprises-use-and-contribute-to-open-source-software/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "aREversez"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Why Do Enterprises Use and Contribute to Open Source Software
|
||||
======
|
||||
When people find out I work at the Linux Foundation they invariably ask what we do? Sometimes it is couched around the question, As in the Linux operating system? I explain open source software and try to capture the worldwide impact into 20 seconds before I lose their attention. If they happen to stick around for more, we often dig into the question, Why would enterprises want to participate in open source software projects or use open source software? The reality is – they do, whether they know it or not. And the reality is thousands of companies donate their code to open source projects and invest time and resources helping to further develop and improve open source software.
|
||||
|
||||
### How extensively used is open source software
|
||||
|
||||
To quote from our recently released report, A Guide to Enterprise Open Source, “Open source software (OSS) has transformed our world and become the backbone of our digital economy and the foundation of our digital world. From the Internet and the mobile apps we use daily to the operating systems and programming languages we use to build the future, OSS has played a vital role. It is the lifeblood of the technology industry. Today, OSS powers the digital economy and enables scientific and technological breakthroughs that improve our lives. It’s in our phones, our cars, our airplanes, our homes, our businesses, and our governments. But just over two decades ago, few people had ever heard of OSS, and its use was limited to a small group of dedicated enthusiasts.”
|
||||
|
||||
Open source software (OSS) has transformed our world and become the backbone of our digital economy and the foundation of our digital world.
|
||||
|
||||
But what does this look like practically:
|
||||
|
||||
* In vertical software stacks across industries, open source penetration ranges from 20 to 85 percent of the overall software used.
|
||||
* Linux fuels 90%+ of web servers and Internet-connected devices.
|
||||
* The Android mobile operating system is built on the Linux kernel.
|
||||
* Immensely [popular libraries and tools][1] to build web applications, such as: AMP, Appium, Dojo, jQuery, Marko, Node.js and so many more are open source.
|
||||
* The world’s top 100 supercomputers run Linux.
|
||||
* 100% of mainframe customers use Linux.
|
||||
* The major cloud-service providers – AWS, Google, and Microsoft – all utilize open-source software to run their services and host open-source solutions delivered through the cloud.
|
||||
|
||||
### Why do companies want to participate in open source software projects
|
||||
|
||||
Companies primarily participate in open source software projects in three ways:
|
||||
|
||||
* They donate software they created to the open source community.
|
||||
* They provide direct funding and/or allocate software developers and other staff to contribute to open source software projects
|
||||
|
||||
The question often asked is, why wouldn’t they want to keep all of their software proprietary or only task their employees to work on their proprietary software?
|
||||
|
||||
The 30,000-foot answer is that it is about organizations coming together to collectively solve common problems so they can separately innovate and differentiate on top of the common baseline. They see that they are better off pooling resources to make the baseline better. Sometimes it is called “coopetition.” It generally means that while companies may be in competition with each other in certain areas, they can still cooperate on others.
|
||||
|
||||
It is about organizations coming together to collectively solve common problems so they can separately innovate and differentiate
|
||||
|
||||
Some old-school examples of this principle:
|
||||
|
||||
* Railroads agreed on a common track size and build so they can all utilize the same lines and equipment was interchangeable.
|
||||
* Before digital cameras, companies innovated and differentiated on film and cameras, but they all agreed on the spacing for the sprockets to advance the film.
|
||||
* The entertainment industry united around the VHS and Blu-Ray formats over their rivals.
|
||||
|
||||
Now, we see companies, organizations, and individuals coming together to solve problems while simultaneously improving their businesses and products:
|
||||
|
||||
[Let’s Encrypt][2] is a free, automated, and open certificate authority with the goal of dramatically increasing the use of secure web protocols by making it much easier and less expensive to setup. They are serving 225+ million websites, issuing ~1.5 million certificates each day on average.
|
||||
|
||||
The [Academy Software Foundation][3] [creates value in the film industry][4] through collectively engineering software that powers much of the entertainment, gaming, and media industry productions and open standards needed for growth.
|
||||
|
||||
The Hyperledger Foundation hosts enterprise-grade blockchain software projects, notably [using significantly fewer energy resources][5] than other popular solutions.
|
||||
|
||||
[LF Energy][6] is [making the electric grid more modular, interoperable, and scalable][7] to help increase the use of renewable energy sources.
|
||||
|
||||
[Dronecode][8] is enabling the development of drone software so companies can use their resources to innovate further.
|
||||
|
||||
[OpenSSF][9] is the top technology companies coming together to strengthen the security and resiliency of open source software.
|
||||
|
||||
[Kubernetes][10] was donated by Google and is the go-to solution for managing cloud-based software.
|
||||
|
||||
These are just a small sampling of the open source software projects that enterprises are participating in. You can explore all of the ones hosted at the Linux Foundation [here][11].
|
||||
|
||||
### How can companies effectively use and participate in open source software projects?
|
||||
|
||||
Enterprises looking to better utilize and participate in open source projects can look to the Linux Foundation’s resources to help. Much of what organizations need to know is provided in the just-published report,[A Guide to Enterprise Open Source][12]. The report is packed with information and insights from open source leaders at top companies with decades of combined experience. It includes chapters on these topics:
|
||||
|
||||
* Leveraging Open Source Software
|
||||
* Preparing the Enterprise for Open Source
|
||||
* Developing an Open Source Strategy
|
||||
* Setting Up Your Infrastructure for Implementation
|
||||
* Setting Up Your Talent for Success
|
||||
* Challenges
|
||||
|
||||
Additionally, the Linux Foundation offers many open source [training courses][13], [events][14] throughout the year, the [LFX Platform][15], and hosts projects that help organizations manage open source utilization and participation, such as:
|
||||
|
||||
The [TODO Group][16] provides resources to setup and run an open source program office, including their [extensive guides][17].
|
||||
|
||||
The [Openchain Project][18] maintains an international standard for sharing what software package licenses are included in a larger package, including information on the various licensing requirements so enterprises can ensure they are complying with all of the legal requirements.
|
||||
|
||||
The [FinOps Foundation][19] is fostering an, “evolving cloud financial management discipline and cultural practice that enables organizations to get maximum business value by helping engineering, finance, technology, and business teams to collaborate on data-driven spending decisions.”.
|
||||
|
||||
The [Software Data Package Exchange (SPDX)][20] is an open standard for communication software bill of materials (SBOMs) so it is clear to every user which pieces of software are included in the overall package.
|
||||
|
||||
Again, this is just a snippet of the projects at the Linux Foundation that are working to help organizations adapt, utilize, contribute, and donate open source projects.
|
||||
|
||||
The bottom line: Enterprises are increasingly turning to open source software projects to solve common problems and innovate beyond the baseline, and the Linux Foundation is here to help.
|
||||
|
||||
The post [Why Do Enterprises Use and Contribute to Open Source Software][21] appeared first on [Linux Foundation][22].
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.linux.com/news/why-do-enterprises-use-and-contribute-to-open-source-software/
|
||||
|
||||
作者:[Dan Whiting][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[aREversez](https://github.com/aREversez)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.linuxfoundation.org/blog/why-do-enterprises-use-and-contribute-to-open-source-software/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://openjsf.org/projects/
|
||||
[2]: https://letsencrypt.org/
|
||||
[3]: https://www.aswf.io/
|
||||
[4]: https://linuxfoundation.org/tools/open-source-in-entertainment/
|
||||
[5]: https://linuxfoundation.org/tools/carbon-footprint-of-nfts/
|
||||
[6]: https://www.lfenergy.org/
|
||||
[7]: https://linuxfoundation.org/tools/paving-the-way-to-battle-climate-change-how-two-utilities-embraced-open-source-to-speed-modernization-of-the-electric-grid/
|
||||
[8]: https://www.dronecode.org/projects/
|
||||
[9]: https://openssf.org/
|
||||
[10]: https://kubernetes.io/
|
||||
[11]: https://linuxfoundation.org/projects/
|
||||
[12]: https://linuxfoundation.org/tools/guide-to-enterprise-open-source/
|
||||
[13]: https://training.linuxfoundation.org/
|
||||
[14]: https://events.linuxfoundation.org/
|
||||
[15]: https://lfx.linuxfoundation.org/
|
||||
[16]: https://todogroup.org/
|
||||
[17]: https://linuxfoundation.org/resources/open-source-guides/
|
||||
[18]: https://www.openchainproject.org/resources
|
||||
[19]: https://www.finops.org/introduction/what-is-finops/
|
||||
[20]: https://spdx.dev/
|
||||
[21]: https://www.linuxfoundation.org/blog/why-do-enterprises-use-and-contribute-to-open-source-software/
|
||||
[22]: https://www.linuxfoundation.org/
|
@ -0,0 +1,120 @@
|
||||
[#]: subject: "SBOM – SB Doesn’t Stand for Silver Bullet"
|
||||
[#]: via: "https://www.linux.com/news/sbom-sb-doesnt-stand-for-silver-bullet/"
|
||||
[#]: author: "Dan Whiting https://www.linuxfoundation.org/blog/sbom-sb-doesnt-stand-for-silver-bullet/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
SBOM – SB Doesn’t Stand for Silver Bullet
|
||||
======
|
||||
Software Bill of Materials (SBOMs) are like ingredient labels on food. They are critical to keep consumers safe and healthy, they are somewhat standardized, but it is a lot more exciting to grow or make the food rather than the label.
|
||||
|
||||
### What is an SBOM?
|
||||
|
||||
What is an SBOM? In short, it is a way to tell another party all of the software that is used in the stack that makes up an application. One benefit of having a SBOM is you know what is in there when a vulnerability comes up. You can easily determine if you are vulnerable and where.
|
||||
|
||||
As modern software is built utilizing a base of software already written (no sense in recreating the wheel), it is important that all of the components don’t get lost in the shuffle. It isn’t readily apparent what a particular piece of software utilizes. So, if a vulnerability for Software A arises, you need to know, do I have that piece of software somewhere in my ecosystem, and, if so, where. Then you can remediate if you need to.
|
||||
|
||||
I can’t take credit for the food label analogy used in my introduction. I heard it from [Allan Friedman][1], a Senior Advisor and Strategist at the [U.S. Cybersecurity and Infrastructure Security Agency][2] (CISA) and a key SBOM advocate, when he presented about SBOMs at the RSA Conference 2022 with [Kate Stewart][3], the VP of Dependable Embedded Systems here at the Linux Foundation. Allan made the point that food labels only provide information. The consumer needs to read and understand them and take appropriate action. For instance, if they are allergic to peanuts, they can look at an ingredient label and determine if they can safely eat the food.
|
||||
|
||||
SBOMs are similar – they tell a person what software is used as an “ingredient” so someone can determine if they need to take action if a vulnerability arises. It isn’t a silver bullet, but it is a vital tool. Without SBOMs no one can track what component “ingredients” are in their software applications.
|
||||
|
||||
### SBOMs and the Software Supply Chain
|
||||
|
||||
Supply chains are impacting our lives more than just restricting availability of consumer goods. Software supply chains are immensely more complicated now as software is built with pre-existing components. This makes software better, more effective, more powerful, etc. But it also introduces risk as more and more parties touch a particular piece of software. Much like our world has become so interdependent, so has our software.
|
||||
|
||||
Understanding what is in the supply chain for our software helps us effectively secure it. When a new risk emerges, we know what we need to do.
|
||||
|
||||
### SBOMs and Software Security
|
||||
|
||||
SBOMs are increasingly being recognized as an important pillar in any comprehensive software security plan. A global [survey conducted in 2021 Q3 by the Linux Foundation][4] found that 78% of organizations responding plan to use SBOMs in 2022. Additionally, the recently published [Open Source Software Security Mobilization Plan][5] recommends SBOMs be universal and the [U.S. Executive Order on Improving the Nation’s Cybersecurity][6] requires SBOMs be provided for software purchased by the U.S. government. And, as Allan points out in his talk, “We buy everything.” The E.O. actually lays out a nice summary of SBOMs and their benefits:
|
||||
|
||||
The term “Software Bill of Materials” or “SBOM” means a formal record containing the details and supply chain relationships of various components used in building software. Software developers and vendors often create products by assembling existing open source and commercial software components. The SBOM enumerates these components in a product. It is analogous to a list of ingredients on food packaging. An SBOM is useful to those who develop or manufacture software, those who select or purchase software, and those who operate software. Developers often use available open source and third-party software components to create a product; an SBOM allows the builder to make sure those components are up to date and to respond quickly to new vulnerabilities. Buyers can use an SBOM to perform vulnerability or license analysis, both of which can be used to evaluate risk in a product. Those who operate software can use SBOMs to quickly and easily determine whether they are at potential risk of a newly discovered vulnerability. A widely used, machine-readable SBOM format allows for greater benefits through automation and tool integration. The SBOMs gain greater value when collectively stored in a repository that can be easily queried by other applications and systems. Understanding the supply chain of software, obtaining an SBOM, and using it to analyze known vulnerabilities are crucial in managing risk.
|
||||
|
||||
Allan and Kate spent time in their talk going into the current state of SBOMs, challenges, benefits, tools available for creating and sharing SBOMs, what is a minimum SBOM, standards being developed, making them fully automated, and more. Look for some future LF Blog posts digging into these.
|
||||
|
||||
But there are things you can do now.
|
||||
|
||||
### What can you and your organization do now?
|
||||
|
||||
Allan and Kate laid out several things you and your organization can do, starting now. Starting within your organization:
|
||||
|
||||
Next week: Understand origins of software your organization is using
|
||||
|
||||
* Commercial: can you ask for an SBOM?
|
||||
* Open source: do you have an SBOM for the binary or sources you’re importing?
|
||||
|
||||
Three months: Understand what SBOMs your customers will require
|
||||
|
||||
Expectations: which standards, dependency depth, licensing info?
|
||||
|
||||
Six months: Prototype and deploy
|
||||
|
||||
Implement SBOM through using an OSS tool and/or starting a conversation with vendor
|
||||
|
||||
And participate in ongoing discussions to determine best practices for the ecosystem and contribute to open source project any code developed to support SBOMs.
|
||||
|
||||
### But there are also steps you can take as an individual:
|
||||
|
||||
Next week: Start playing with an open source SBOM tool and apply it to a repo
|
||||
|
||||
Three months: Have an SBOM strategy that explicitly identifies tooling needs
|
||||
|
||||
Six months:
|
||||
|
||||
Begin SBOM implementation through using an OSS tool or starting a conversation with vendor
|
||||
Participate in a plugfest and try to consume another’s SBOM
|
||||
|
||||
And make sure to share any open source and commercial tools you find helpful and work with the tools to help harden them, test and report bugs, and push them to scale.
|
||||
|
||||
### How can you shape the future of SBOMs?
|
||||
|
||||
First, I want to highlight some upcoming opportunities they shared to help shape the future of SBOMs. CISA is running public Tooling & Implementation work stream discussions in July 2022. They are the same, but occur at different times to help accommodate more time zones:
|
||||
|
||||
* July 13, 2022 – 3:00-4:30 PM ET
|
||||
* July 21, 2022 – 9:30-11:00 AM ET
|
||||
|
||||
If you want to participate, please email [SBOM@cisa.dhs.gov][7].
|
||||
|
||||
Additionally, there will be “[plugfests][8]” to be announced soon, and they suggested organizations already adopting SBOMs publish case studies and reference tooling workflows to help others.
|
||||
|
||||
### Conclusion
|
||||
|
||||
SBOMs are here to stay. If you aren’t already, get on the train now. It is pulling out of the station, but you still have an opportunity to help shape where it is going and how well the journey goes.
|
||||
|
||||
Allan’s and Kate’s slides are available [here][9]. If you registered to attend the RSA Conference, you can now watch their full presentation on demand [here][10].
|
||||
|
||||
### The Software Package Data ExchangeⓇ (SPDXⓇ)
|
||||
|
||||
The Linux Foundation hosts SPDX, which is an open standard for communicating software bill of material information, including components, licenses, copyrights, and security references. SPDX reduces redundant work by providing a common format for companies and communities to share important data, thereby streamlining and improving compliance. The SPDX specification is an international open standard (ISO/IEC 5962:2021). Learn more at [spdx.dev][11].
|
||||
|
||||
The post [SBOM – SB Doesn’t Stand for Silver Bullet][12] appeared first on [Linux Foundation][13].
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.linux.com/news/sbom-sb-doesnt-stand-for-silver-bullet/
|
||||
|
||||
作者:[Dan Whiting][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.linuxfoundation.org/blog/sbom-sb-doesnt-stand-for-silver-bullet/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://www.linkedin.com/in/allanafriedman/
|
||||
[2]: https://www.cisa.gov/
|
||||
[3]: https://www.linkedin.com/in/katestewartaustin/
|
||||
[4]: https://www.linuxfoundation.org/tools/the-state-of-software-bill-of-materials-sbom-and-cybersecurity-readiness/
|
||||
[5]: https://openssf.org/oss-security-mobilization-plan/
|
||||
[6]: https://openssf.org/blog/2021/05/14/how-lf-communities-enable-security-measures-required-by-the-us-executive-order-on-cybersecurity/
|
||||
[7]: https://www.linux.com/mailto:SBOM@cisa.dhs.gov
|
||||
[8]: https://en.wikipedia.org/wiki/Plugtest
|
||||
[9]: https://www.linuxfoundation.org/wp-content/uploads/Tooling-up-Getting-SBOMs-to-Scale_slides.pdf
|
||||
[10]: https://www.rsaconference.com/usa/agenda/session/Tooling%20up%20Getting%20SBOMs%20to%20Scale
|
||||
[11]: https://spdx.dev/
|
||||
[12]: https://www.linuxfoundation.org/blog/sbom-sb-doesnt-stand-for-silver-bullet/
|
||||
[13]: https://www.linuxfoundation.org/
|
@ -1,5 +1,5 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: translator: (lkxed)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
@ -1,393 +0,0 @@
|
||||
[#]: subject: (Create a countdown clock with a Raspberry Pi)
|
||||
[#]: via: (https://opensource.com/article/21/3/raspberry-pi-countdown-clock)
|
||||
[#]: author: (Chris Collins https://opensource.com/users/clcollins)
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( Donkey-Hao )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
||||
Create a countdown clock with a Raspberry Pi
|
||||
======
|
||||
Start counting down the days to your next holiday with a Raspberry Pi
|
||||
and an ePaper display.
|
||||
![Alarm clocks with different time][1]
|
||||
|
||||
For 2021, [Pi Day][2] has come and gone, leaving fond memories and [plenty of Raspberry Pi projects][3] to try out. The days after any holiday can be hard when returning to work after high spirits and plenty of fun, and Pi Day is no exception. As we look into the face of the Ides of March, we can long for the joys of the previous, well, day. But fear no more, dear Pi Day celebrant! For today, we begin the long countdown to the next Pi Day!
|
||||
|
||||
OK, but seriously. I made a Pi Day countdown timer, and you can too!
|
||||
|
||||
A while back, I purchased a [Raspberry Pi Zero W][4] and recently used it to [figure out why my WiFi was so bad][5]. I was also intrigued by the idea of getting an ePaper display for the little Zero W. I didn't have a good use for one, but, dang it, it looked like fun! I purchased a little 2.13" [Waveshare display][6], which fit perfectly on top of the Raspberry Pi Zero W. It's easy to install: Just slip the display down onto the Raspberry Pi's GIPO headers and you're good to go.
|
||||
|
||||
I used [Raspberry Pi OS][7] for this project, and while it surely can be done with other operating systems, the `raspi-config` command, used below, is most easily available on Raspberry Pi OS.
|
||||
|
||||
### Set up the Raspberry Pi and the ePaper display
|
||||
|
||||
Setting up the Raspberry Pi to work with the ePaper display requires you to enable the Serial Peripheral Interface (SPI) in the Raspberry Pi software, install the BCM2835 C libraries (to access the GPIO functions for the Broadcom BCM 2835 chip on the Raspberry Pi), and install Python GPIO libraries to control the ePaper display. Finally, you need to install the Waveshare libraries for working with the 2.13" display using Python.
|
||||
|
||||
Here's a step-by-step walkthrough of how to do these tasks.
|
||||
|
||||
#### Enable SPI
|
||||
|
||||
The easiest way to enable SPI is with the Raspberry Pi `raspi-config` command. The SPI bus allows serial data communication to be used with devices—in this case, the ePaper display:
|
||||
|
||||
|
||||
```
|
||||
`$ sudo raspi-config`
|
||||
```
|
||||
|
||||
From the menu that pops up, select **Interfacing Options** -> **SPI** -> **Yes** to enable the SPI interface, then reboot.
|
||||
|
||||
#### Install BCM2835 libraries
|
||||
|
||||
As mentioned above, the BCM2835 libraries are software for the Broadcom BCM2385 chip on the Raspberry Pi, which allows access to the GPIO pins and the ability to use them to control devices.
|
||||
|
||||
As I'm writing this, the latest version of the Broadcom BCM 2835 libraries for the Raspberry Pi is v1.68. To install the libraries, you need to download the software tarball and build and install the software with `make`:
|
||||
|
||||
|
||||
```
|
||||
# Download the BCM2853 libraries and extract them
|
||||
$ curl -sSL <http://www.airspayce.com/mikem/bcm2835/bcm2835-1.68.tar.gz> -o - | tar -xzf -
|
||||
|
||||
# Change directories into the extracted code
|
||||
$ pushd bcm2835-1.68/
|
||||
|
||||
# Configure, build, check and install the BCM2853 libraries
|
||||
$ sudo ./configure
|
||||
$ sudo make check
|
||||
$ sudo make install
|
||||
|
||||
# Return to the original directory
|
||||
$ popd
|
||||
```
|
||||
|
||||
#### Install required Python libraries
|
||||
|
||||
You also need some Python libraries to use Python to control the ePaper display, the `RPi.GPIO` pip package. You also need the `python3-pil` package for drawing shapes. Apparently, the PIL package is all but dead, but there is an alternative, [Pillow][8]. I have not tested Pillow for this project, but it may work:
|
||||
|
||||
|
||||
```
|
||||
# Install the required Python libraries
|
||||
$ sudo apt-get update
|
||||
$ sudo apt-get install python3-pip python3-pil
|
||||
$ sudo pip3 install RPi.GPIO
|
||||
```
|
||||
|
||||
_Note: These instructions are for Python 3. You can find Python 2 instructions on Waveshare's website_
|
||||
|
||||
#### Download Waveshare examples and Python libraries
|
||||
|
||||
Waveshare maintains a Git repository with Python and C libraries for working with its ePaper displays and some examples that show how to use them. For this countdown clock project, you will clone this repository and use the libraries for the 2.13" display:
|
||||
|
||||
|
||||
```
|
||||
# Clone the WaveShare e-Paper git repository
|
||||
$ git clone <https://github.com/waveshare/e-Paper.git>
|
||||
```
|
||||
|
||||
If you're using a different display or a product from another company, you'll need to use the appropriate software for your display.
|
||||
|
||||
Waveshare provides instructions for most of the above on its website:
|
||||
|
||||
* [WaveShare ePaper setup instructions][9]
|
||||
* [WaveShare ePaper libraries install instructions][10]
|
||||
|
||||
|
||||
|
||||
#### Get a fun font (optional)
|
||||
|
||||
You can display your timer however you want, but why not do it with a little style? Find a cool font to work with!
|
||||
|
||||
There's a ton of [Open Font License][11] fonts available out there. I am particularly fond of Bangers. You've seen this if you've ever watched YouTube—it's used _all over_. It can be downloaded and dropped into your user's local shared fonts directory to make it available for any application, including this project:
|
||||
|
||||
|
||||
```
|
||||
# The "Bangers" font is a Open Fonts License licensed font by Vernon Adams (<https://github.com/vernnobile>) from Google Fonts
|
||||
$ mkdir -p ~/.local/share/fonts
|
||||
$ curl -sSL <https://github.com/google/fonts/raw/master/ofl/bangers/Bangers-Regular.ttf> -o fonts/Bangers-Regular.ttf
|
||||
```
|
||||
|
||||
### Create a Pi Day countdown timer
|
||||
|
||||
Now that you have installed the software to work with the ePaper display and a fun font to use, you can build something cool with it: a timer to count down to the next Pi Day!
|
||||
|
||||
If you want, you can just grab the [countdown.py][12] Python file from this project's [GitHub repo][13] and skip to the end of this article.
|
||||
|
||||
For the curious, I'll break down that file, section by section.
|
||||
|
||||
#### Import some libraries
|
||||
|
||||
|
||||
```
|
||||
#!/usr/bin/python3
|
||||
# -*- coding:utf-8 -*-
|
||||
import logging
|
||||
import os
|
||||
import sys
|
||||
import time
|
||||
|
||||
from datetime import datetime
|
||||
from pathlib import Path
|
||||
from PIL import Image,ImageDraw,ImageFont
|
||||
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
|
||||
basedir = Path(__file__).parent
|
||||
waveshare_base = basedir.joinpath('e-Paper', 'RaspberryPi_JetsonNano', 'python')
|
||||
libdir = waveshare_base.joinpath('lib')
|
||||
```
|
||||
|
||||
At the start, the Python script imports some standard libraries used later in the script. You also need to add `Image`, `ImageDraw`, and `ImageFont` from the PIL package, which you'll use to draw some simple geometric shapes. Finally, set some variables for the local `lib` directory that contains the Waveshare Python libraries for working with the 2.13" display, and which you can use later to load the library from the local directory.
|
||||
|
||||
#### Font size helper function
|
||||
|
||||
The next part of the script has a helper function for setting the font size for your chosen font: Bangers-Regular.ttf. It takes an integer for the font size and returns an ImageFont object you can use with the display:
|
||||
|
||||
|
||||
```
|
||||
def set_font_size(font_size):
|
||||
logging.info("Loading font...")
|
||||
return ImageFont.truetype(f"{basedir.joinpath('Bangers-Regular.ttf').resolve()}", font_size)
|
||||
```
|
||||
|
||||
#### Countdown logic
|
||||
|
||||
Next is a small function that calculates the meat of this project: how long it is until the next Pi Day. If it were, say, January, it would be relatively straightforward to count how many days are left, but you also need to consider whether Pi Day has already passed for the year (sadface), and if so, count how very, very many days are ahead until you can celebrate again:
|
||||
|
||||
|
||||
```
|
||||
def countdown(now):
|
||||
piday = datetime(now.year, 3, 14)
|
||||
|
||||
# Add a year if we're past PiDay
|
||||
if piday < now:
|
||||
piday = datetime((now.year + 1), 3, 14)
|
||||
|
||||
days = (piday - now).days
|
||||
|
||||
logging.info(f"Days till piday: {days}")
|
||||
return day
|
||||
```
|
||||
|
||||
#### The main function
|
||||
|
||||
Finally, you get to the main function, which initializes the display and begins writing data to it. In this case, you'll write a welcome message and then begin the countdown to the next Pi Day. But first, you need to load the Waveshare library:
|
||||
|
||||
|
||||
```
|
||||
def main():
|
||||
|
||||
if os.path.exists(libdir):
|
||||
sys.path.append(f"{libdir}")
|
||||
from waveshare_epd import epd2in13_V2
|
||||
else:
|
||||
logging.fatal(f"not found: {libdir}")
|
||||
sys.exit(1)
|
||||
```
|
||||
|
||||
The snippet above checks to make sure the library has been downloaded to a directory alongside the countdown script, and then it loads the `epd2in13_V2` library. If you're using a different display, you will need to use a different library. You can also write your own if you are so inclined. I found it kind of interesting to read the Python code that Waveshare provides with the display. It's considerably less complicated than I would have imagined it to be, if somewhat tedious.
|
||||
|
||||
The next bit of code creates an EPD (ePaper Display) object to interact with the display and initializes the hardware:
|
||||
|
||||
|
||||
```
|
||||
logging.info("Starting...")
|
||||
try:
|
||||
# Create an a display object
|
||||
epd = epd2in13_V2.EPD()
|
||||
|
||||
# Initialize the displace, and make sure it's clear
|
||||
# ePaper keeps it's state unless updated!
|
||||
logging.info("Initialize and clear...")
|
||||
epd.init(epd.FULL_UPDATE)
|
||||
epd.Clear(0xFF)
|
||||
```
|
||||
|
||||
An interesting aside about ePaper: It uses power only when it changes a pixel from white to black or vice-versa. This means when the power is removed from the device or the application stops for whatever reason, whatever was on the screen remains. That's great from a power-consumption perspective, but it also means you need to clear the display when starting up, or your script will just write over whatever is already on the screen. Hence, `epd.Clear(0xFF)` is used to clear the display when the script starts.
|
||||
|
||||
Next, create a "canvas" where you will draw the rest of your display output:
|
||||
|
||||
|
||||
```
|
||||
# Create an image object
|
||||
# NOTE: The "epd.heigh" is the LONG side of the screen
|
||||
# NOTE: The "epd.width" is the SHORT side of the screen
|
||||
# Counter-intuitive...
|
||||
logging.info(f"Creating canvas - height: {epd.height}, width: {epd.width}")
|
||||
image = Image.new('1', (epd.height, epd.width), 255) # 255: clear the frame
|
||||
draw = ImageDraw.Draw(image)
|
||||
```
|
||||
|
||||
This matches the width and height of the display—but it is somewhat counterintuitive, in that the short side of the display is the width. I think of the long side as the width, so this is just something to note. Note that the `epd.height` and `epd.width` are set by the Waveshare library to correspond to the device you're using.
|
||||
|
||||
#### Welcome message
|
||||
|
||||
Next, you'll start to draw something. This involves setting data on the "canvas" object you created above. This doesn't draw it to the ePaper display yet—you're just building the image you want right now. Create a little welcome message celebrating Pi Day, with an image of a piece of pie, drawn by yours truly just for this project:
|
||||
|
||||
![drawing of a piece of pie][14]
|
||||
|
||||
(Chris Collins, [CC BY-SA 4.0][15])
|
||||
|
||||
Cute, huh?
|
||||
|
||||
|
||||
```
|
||||
logging.info("Set text text...")
|
||||
bangers64 = set_font_size(64)
|
||||
draw.text((0, 30), 'PI DAY!', font = bangers64, fill = 0)
|
||||
|
||||
logging.info("Set BMP...")
|
||||
bmp = Image.open(basedir.joinpath("img", "pie.bmp"))
|
||||
image.paste(bmp, (150,2))
|
||||
```
|
||||
|
||||
Finally, _finally_, you get to display the canvas you drew, and it's a little bit anti-climactic:
|
||||
|
||||
|
||||
```
|
||||
logging.info("Display text and BMP")
|
||||
epd.display(epd.getbuffer(image))
|
||||
```
|
||||
|
||||
That bit above updates the display to show the image you drew.
|
||||
|
||||
Next, prepare another image to display your countdown timer.
|
||||
|
||||
#### Pi Day countdown timer
|
||||
|
||||
First, create a new image object that you can use to draw the display. Also, set some new font sizes to use for the image:
|
||||
|
||||
|
||||
```
|
||||
logging.info("Pi Date countdown; press CTRL-C to exit")
|
||||
piday_image = Image.new('1', (epd.height, epd.width), 255)
|
||||
piday_draw = ImageDraw.Draw(piday_image)
|
||||
|
||||
# Set some more fonts
|
||||
bangers36 = set_font_size(36)
|
||||
bangers64 = set_font_size(64)
|
||||
```
|
||||
|
||||
To display a ticker like a countdown, it's more efficient to update part of the image, changing the display for only what has changed in the data you want to draw. The next bit of code prepares the display to function this way:
|
||||
|
||||
|
||||
```
|
||||
# Prep for updating display
|
||||
epd.displayPartBaseImage(epd.getbuffer(piday_image))
|
||||
epd.init(epd.PART_UPDATE)
|
||||
```
|
||||
|
||||
Finally, you get to the timer bit, starting an infinite loop that checks how long it is until the next Pi Day and displays the countdown on the ePaper display. If it actually _is_ Pi Day, you can handle that with a little celebration message:
|
||||
|
||||
|
||||
```
|
||||
while (True):
|
||||
days = countdown(datetime.now())
|
||||
unit = get_days_unit(days)
|
||||
|
||||
# Clear the bottom half of the screen by drawing a rectangle filld with white
|
||||
piday_draw.rectangle((0, 50, 250, 122), fill = 255)
|
||||
|
||||
# Draw the Header
|
||||
piday_draw.text((10,10), "Days till Pi-day:", font = bangers36, fill = 0)
|
||||
|
||||
if days == 0:
|
||||
# Draw the Pi Day celebration text!
|
||||
piday_draw.text((0, 50), f"It's Pi Day!", font = bangers64, fill = 0)
|
||||
else:
|
||||
# Draw how many days until Pi Day
|
||||
piday_draw.text((70, 50), f"{str(days)} {unit}", font = bangers64, fill = 0)
|
||||
|
||||
# Render the screen
|
||||
epd.displayPartial(epd.getbuffer(piday_image))
|
||||
time.sleep(5)
|
||||
```
|
||||
|
||||
The last bit of the script does some error handling, including some code to catch keyboard interrupts so that you can stop the infinite loop with **Ctrl**+**C** and a small function to print "day" or "days" depending on whether or not the output should be singular (for that one, single day each year when it's appropriate):
|
||||
|
||||
|
||||
```
|
||||
except IOError as e:
|
||||
logging.info(e)
|
||||
|
||||
except KeyboardInterrupt:
|
||||
logging.info("Exiting...")
|
||||
epd.init(epd.FULL_UPDATE)
|
||||
epd.Clear(0xFF)
|
||||
time.sleep(1)
|
||||
epd2in13_V2.epdconfig.module_exit()
|
||||
exit()
|
||||
|
||||
def get_days_unit(count):
|
||||
if count == 1:
|
||||
return "day"
|
||||
|
||||
return "days"
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
```
|
||||
|
||||
And there you have it! A script to count down and display how many days are left until Pi Day! Here's an action shot on my Raspberry Pi (sped up by 86,400; I don't have nearly enough disk space to save a day-long video):
|
||||
|
||||
![Pi Day Countdown Timer In Action][16]
|
||||
|
||||
(Chris Collins, [CC BY-SA 4.0][15])
|
||||
|
||||
#### Install the systemd service (optional)
|
||||
|
||||
If you'd like the countdown display to run whenever the system is turned on and without you having to be logged in and run the script, you can install the optional systemd unit as a [systemd user service][17]).
|
||||
|
||||
Copy the [piday.service][18] file on GitHub to `${HOME}/.config/systemd/user`, first creating the directory if it doesn't exist. Then you can enable the service and start it:
|
||||
|
||||
|
||||
```
|
||||
$ mkdir -p ~/.config/systemd/user
|
||||
$ cp piday.service ~/.config/systemd/user
|
||||
$ systemctl --user enable piday.service
|
||||
$ systemctl --user start piday.service
|
||||
|
||||
# Enable lingering, to create a user session at boot
|
||||
# and allow services to run after logout
|
||||
$ loginctl enable-linger $USER
|
||||
```
|
||||
|
||||
The script will output to the systemd journal, and the output can be viewed with the `journalctl` command.
|
||||
|
||||
### It's beginning to look a lot like Pi Day!
|
||||
|
||||
And _there_ you have it! A Pi Day countdown timer, displayed on an ePaper display using a Raspberry Pi Zero W, and starting on system boot with a systemd unit file! Now there are just 350-something days until we can once again come together and celebrate the fantastic device that is the Raspberry Pi. And we can see exactly how many days at a glance with our tiny project.
|
||||
|
||||
But in truth, anyone can hold Pi Day in their hearts year-round, so enjoy creating some fun and educational projects with your own Raspberry Pi!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/21/3/raspberry-pi-countdown-clock
|
||||
|
||||
作者:[Chris Collins][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/clcollins
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/clocks_time.png?itok=_ID09GDk (Alarm clocks with different time)
|
||||
[2]: https://en.wikipedia.org/wiki/Pi_Day
|
||||
[3]: https://opensource.com/tags/raspberry-pi
|
||||
[4]: https://www.raspberrypi.org/products/raspberry-pi-zero-w/
|
||||
[5]: https://opensource.com/article/21/3/troubleshoot-wifi-go-raspberry-pi
|
||||
[6]: https://www.waveshare.com/product/displays/e-paper.htm
|
||||
[7]: https://www.raspberrypi.org/software/operating-systems/
|
||||
[8]: https://pypi.org/project/Pillow/
|
||||
[9]: https://www.waveshare.com/wiki/2.13inch_e-Paper_HAT
|
||||
[10]: https://www.waveshare.com/wiki/Libraries_Installation_for_RPi
|
||||
[11]: https://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL
|
||||
[12]: https://github.com/clcollins/epaper-pi-ex/blob/main/countdown.py
|
||||
[13]: https://github.com/clcollins/epaper-pi-ex/
|
||||
[14]: https://opensource.com/sites/default/files/uploads/pie.png (drawing of a piece of pie)
|
||||
[15]: https://creativecommons.org/licenses/by-sa/4.0/
|
||||
[16]: https://opensource.com/sites/default/files/uploads/piday_countdown.gif (Pi Day Countdown Timer In Action)
|
||||
[17]: https://wiki.archlinux.org/index.php/systemd/User
|
||||
[18]: https://github.com/clcollins/epaper-pi-ex/blob/main/piday.service
|
@ -1,305 +0,0 @@
|
||||
[#]: subject: (Learn the Lisp programming language in 2021)
|
||||
[#]: via: (https://opensource.com/article/21/5/learn-lisp)
|
||||
[#]: author: (Seth Kenlon https://opensource.com/users/seth)
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
||||
Learn the Lisp programming language in 2021
|
||||
======
|
||||
A lot of Lisp code lurks inside big codebases, so it's smart to get
|
||||
familiar with the language.
|
||||
![Woman sitting in front of her laptop][1]
|
||||
|
||||
Lisp was invented in 1958, which makes it the second-oldest computer programming language. It has spawned several modern derivatives, including Common Lisp, Emacs Lisp (Elisp), Clojure, Racket, Scheme, Fennel, and GNU Guile.
|
||||
|
||||
People who love thinking about the design of programming languages often love Lisp because of how its syntax and data share the same structure: Lisp code is essentially a list of lists, and its name is an acronym for _LISt Processing_. People who love thinking about the aesthetics of programming languages often hate Lisp because of its frequent use of parentheses for scoping; in fact, it's a common joke that Lisp stands for _Lots of Irritating Superfluous Parentheses_.
|
||||
|
||||
Whether you love or hate its design philosophies, Lisp is an interesting glimpse at the past and, thanks to Clojure and Guile, into the future. You might be surprised how much Lisp code there is lurking within big codebases in any given industry, so it's a good idea to have at least a passing familiarity with the language.
|
||||
|
||||
### Install Lisp
|
||||
|
||||
There are many implementations of Lisp. Popular open source versions include [SBCL][2] and [GNU Common Lisp][3] (GCL). You can install either of these with your distribution's package manager.
|
||||
|
||||
On Fedora Linux:
|
||||
|
||||
|
||||
```
|
||||
`$ sudo dnf install gcl`
|
||||
```
|
||||
|
||||
On Debian:
|
||||
|
||||
|
||||
```
|
||||
`$ sudo apt install gcl`
|
||||
```
|
||||
|
||||
For macOS, you can use [MacPorts][4] or [Homebrew][5]:
|
||||
|
||||
|
||||
```
|
||||
`$ sudo port install gcl`
|
||||
```
|
||||
|
||||
For Windows, download a binary from [gnu.org/software/gcl][6].
|
||||
|
||||
For this article, I'm using GCL and its `clisp` command, but most of the principles apply to any Lisp.
|
||||
|
||||
### List processing
|
||||
|
||||
The basic unit of Lisp source code is an _expression_, which is written as a list. For instance, this is a list of an operator (`+`) and two integers (`1` and `2`):
|
||||
|
||||
|
||||
```
|
||||
`(+ 1 2)`
|
||||
```
|
||||
|
||||
It's also a Lisp expression, using a symbol (`+`) that evaluates to a function (addition) and two arguments (`1` and `2`). You can run this expression and others in an interactive Common Lisp environment called REPL (read-eval-print loop). If you're familiar with Python's IDLE, Lisp's REPL should feel somewhat familiar to you.
|
||||
|
||||
To launch a REPL, launch Common Lisp:
|
||||
|
||||
|
||||
```
|
||||
$ clisp
|
||||
[1]>
|
||||
```
|
||||
|
||||
At the REPL prompt, type a few expressions:
|
||||
|
||||
|
||||
```
|
||||
[1]> (+ 1 2)
|
||||
3
|
||||
[2]> (- 1 2)
|
||||
-1
|
||||
[3]> (- 2 1)
|
||||
1
|
||||
[4]> (+ 2 3 4)
|
||||
9
|
||||
```
|
||||
|
||||
### Functions
|
||||
|
||||
Now that you know the basic structure of a Lisp expression, you can utilize Lisp functions in useful ways. The `print` function takes any argument you provide and displays it on your terminal, while the `pprint` function "pretty" prints it. There are other variations on the print function, but `pprint` is nice in REPL:
|
||||
|
||||
|
||||
```
|
||||
[1]> (pprint "hello world")
|
||||
|
||||
"hello world"
|
||||
|
||||
[2]>
|
||||
```
|
||||
|
||||
You can create your own functions with `defun`. The `defun` function requires a name for your function and any parameters you want your function to accept:
|
||||
|
||||
|
||||
```
|
||||
[1]> (defun myprinter (s) (pprint s))
|
||||
MYPRINTER
|
||||
[2]> (myprinter "hello world")
|
||||
|
||||
"hello world"
|
||||
|
||||
[3]>
|
||||
```
|
||||
|
||||
### Variables
|
||||
|
||||
You can create variables in Lisp with `setf`:
|
||||
|
||||
|
||||
```
|
||||
[1]> (setf foo "hello world")
|
||||
"hello world"
|
||||
[2]> (pprint foo)
|
||||
|
||||
"hello world"
|
||||
|
||||
[3]>
|
||||
```
|
||||
|
||||
You can nest expressions within expressions in a kind of pipeline. For instance, you can pretty print the contents of your variable after invoking the `string-upcase` function to convert its characters to uppercase:
|
||||
|
||||
|
||||
```
|
||||
[3]> (pprint (string-upcase foo))
|
||||
|
||||
"HELLO WORLD"
|
||||
|
||||
[4]>
|
||||
```
|
||||
|
||||
Lisp is dynamically typed in the sense that you don't have to declare variable types when setting them. Lisp treats integers as integers by default:
|
||||
|
||||
|
||||
```
|
||||
[1]> (setf foo 2)
|
||||
[2]> (setf bar 3)
|
||||
[3]> (+ foo bar)
|
||||
5
|
||||
```
|
||||
|
||||
If you intend for an integer to be interpreted as a string, you can quote it:
|
||||
|
||||
|
||||
```
|
||||
[4]> (setf foo "2")
|
||||
"2"
|
||||
[5]> (setf bar "3")
|
||||
"3"
|
||||
[6]> (+ foo bar)
|
||||
|
||||
*** - +: "2" is not a number
|
||||
The following restarts are available:
|
||||
USE-VALUE :R1 Input a value to be used instead.
|
||||
ABORT :R2 Abort main loop
|
||||
Break 1 [7]>
|
||||
```
|
||||
|
||||
In this sample REPL session, both `foo` and `bar` are set to quoted numbers, so Lisp interprets them as strings. Math operators can't be used on strings, so REPL drops into a debugger mode. To get out of the debugger, press **Ctrl+D** on your keyboard.
|
||||
|
||||
You can do some introspection on objects using the `typep` function, which tests for a specific data type. The tokens `T` and `NIL` represent _True_ and _False_, respectively.
|
||||
|
||||
|
||||
```
|
||||
[4]> (typep foo 'string)
|
||||
NIL
|
||||
[5]> (typep foo 'integer)
|
||||
T
|
||||
```
|
||||
|
||||
The single quote (`'`) before `string` and `integer` prevents Lisp from (incorrectly) evaluating those keywords as variables:
|
||||
|
||||
|
||||
```
|
||||
[6]> (typep foo string)
|
||||
*** - SYSTEM::READ-EVAL-PRINT: variable STRING has no value
|
||||
[...]
|
||||
```
|
||||
|
||||
It's a shorthand way to protect the terms, normally done with the `quote` function:
|
||||
|
||||
|
||||
```
|
||||
[7]> (typep foo (quote string))
|
||||
NIL
|
||||
[5]> (typep foo (quote integer))
|
||||
T
|
||||
```
|
||||
|
||||
### Lists
|
||||
|
||||
Unsurprisingly, you can also create lists in Lisp:
|
||||
|
||||
|
||||
```
|
||||
[1]> (setf foo (list "hello" "world"))
|
||||
("hello" "world")
|
||||
```
|
||||
|
||||
Lists can be indexed with the `nth` function:
|
||||
|
||||
|
||||
```
|
||||
[2]> (nth 0 foo)
|
||||
"hello"
|
||||
[3]> (pprint (string-capitalize (nth 1 foo)))
|
||||
|
||||
"World"
|
||||
```
|
||||
|
||||
### Exiting REPL
|
||||
|
||||
To end a REPL session, press **Ctrl+D** on your keyboard, or use the `quit` keyword in Lisp:
|
||||
|
||||
|
||||
```
|
||||
[99]> (quit)
|
||||
$
|
||||
```
|
||||
|
||||
### Scripting
|
||||
|
||||
Lisp can be compiled or used as an interpreted scripting language. The latter is probably the easiest option when you're starting, especially if you're already familiar with Python or [shell scripting][7].
|
||||
|
||||
Here's a simple dice roller script written in GNU Common Lisp:
|
||||
|
||||
|
||||
```
|
||||
#!/usr/bin/clisp
|
||||
|
||||
(defun roller (num)
|
||||
(pprint (random (parse-integer (nth 0 num))))
|
||||
)
|
||||
|
||||
(setf userput *args*)
|
||||
(setf *random-state* (make-random-state t))
|
||||
(roller userput)
|
||||
```
|
||||
|
||||
The first line tells your [POSIX][8] terminal what executable to use to run the script.
|
||||
|
||||
The `roller` function, created with `defun`, uses the `random` function to print a pseudo-random number up to, and not including, the zeroth item of the `num` list. The `num` list hasn't been created yet in the script, but the function doesn't get executed until it's called.
|
||||
|
||||
The next line assigns any argument provided to the script at launch time to a variable called `userput`. The `userput` variable is a list, and it's what becomes `num` once it's passed to the `roller` function.
|
||||
|
||||
The penultimate line of the script starts a _random seed_. This provides Lisp with enough entropy to generate a mostly random number.
|
||||
|
||||
The final line invokes the custom `roller` function, providing the `userput` list as its sole argument.
|
||||
|
||||
Save the file as `dice.lisp` and mark it executable:
|
||||
|
||||
|
||||
```
|
||||
`$ chmod +x dice.lisp`
|
||||
```
|
||||
|
||||
Finally, try running it, providing it with a maximum number from which to choose its random number:
|
||||
|
||||
|
||||
```
|
||||
$ ./dice.lisp 21
|
||||
|
||||
13
|
||||
$ ./dice.lisp 21
|
||||
|
||||
7
|
||||
$ ./dice.lisp 21
|
||||
|
||||
20
|
||||
```
|
||||
|
||||
Not bad!
|
||||
|
||||
### Learn Lisp
|
||||
|
||||
Whether you can imagine using Lisp as a utilitarian language for personal scripts, to advance your career, or just as a fun experiment, you can see some particularly inventive uses at the annual [Lisp Game Jam][9] (most submissions are open source, so you can view the code to learn from what you play).
|
||||
|
||||
Lisp is a fun and unique language with an ever-growing developer base and enough historic and emerging dialects to keep programmers from all disciplines happy.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/21/5/learn-lisp
|
||||
|
||||
作者:[Seth Kenlon][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/seth
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/OSDC_women_computing_4.png?itok=VGZO8CxT (Woman sitting in front of her laptop)
|
||||
[2]: http://sbcl.org
|
||||
[3]: https://www.gnu.org/software/gcl/
|
||||
[4]: https://opensource.com/article/20/11/macports
|
||||
[5]: https://opensource.com/article/20/6/homebrew-linux
|
||||
[6]: http://mirror.lagoon.nc/gnu/gcl/binaries/stable
|
||||
[7]: https://opensource.com/article/20/4/bash-programming-guide
|
||||
[8]: https://opensource.com/article/19/7/what-posix-richard-stallman-explains
|
||||
[9]: https://itch.io/jam/spring-lisp-game-jam-2021
|
@ -1,204 +0,0 @@
|
||||
[#]: subject: (Write your first JavaScript code)
|
||||
[#]: via: (https://opensource.com/article/21/7/javascript-cheat-sheet)
|
||||
[#]: author: (Seth Kenlon https://opensource.com/users/seth)
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
||||
Write your first JavaScript code
|
||||
======
|
||||
JavaScript was created for the web, but it can do so much more. Learn
|
||||
the basics, then download our cheat sheet so you always have the details
|
||||
at hand.
|
||||
![Code with javascript on white background][1]
|
||||
|
||||
JavaScript is a programming language full of pleasant surprises. Many people first encounter JavaScript as a language for the web. There's a JavaScript engine in all the major browsers, there are popular frameworks such as JQuery, Cash, and Bootstrap to help make web design easier, and there are even programming environments written in JavaScript. It seems to be everywhere on the internet, but it turns out that it's also a useful language for projects like [Electron][2], an open source toolkit for building cross-platform desktop apps with JavaScript.
|
||||
|
||||
JavaScript is a surprisingly multipurpose language with a wide assortment of libraries for much more than just making websites. Learning the basics of the language is easy, and it's a gateway to building whatever you imagine.
|
||||
|
||||
### Install JavaScript
|
||||
|
||||
As you progress with JavaScript, you may find yourself wanting advanced JavaScript libraries and runtimes. When you're just starting, though, you don't have to install JavaScript at all. All major web browsers include a JavaScript engine to run the code. You can write JavaScript using your favorite text editor, load it into your web browser, and see what your code does.
|
||||
|
||||
### Get started with JavaScript
|
||||
|
||||
To write your first JavaScript code, open your favorite text editor, such as [Notepad++][3], [Atom][4], or [VSCode][5]. Because it was developed for the web, JavaScript works well with HTML, so first, just try some basic HTML:
|
||||
|
||||
|
||||
```
|
||||
<[html][6]>
|
||||
<[head][7]>
|
||||
<[title][8]>JS</[title][8]>
|
||||
</[head][7]>
|
||||
<[body][9]>
|
||||
<[p][10] id="example">Nothing here.</[p][10]>
|
||||
</[body][9]>
|
||||
</[html][6]>
|
||||
```
|
||||
|
||||
Save the file, and then open it in a web browser.
|
||||
|
||||
![HTML displayed in browser][11]
|
||||
|
||||
(Seth Kenlon, [CC BY-SA 4.0][12])
|
||||
|
||||
To add JavaScript to this simple HTML page, you can either create a JavaScript file and refer to it in the page's `head` or just embed your JavaScript code in the HTML using the `<script>` tag. In this example, I embed the code:
|
||||
|
||||
|
||||
```
|
||||
<[html][6]>
|
||||
<[head][7]>
|
||||
<[title][8]>JS</[title][8]>
|
||||
</[head][7]>
|
||||
<[body][9]>
|
||||
<[p][10] id="example">Nothing here.</[p][10]>
|
||||
|
||||
<[script][13]>
|
||||
let myvariable = "Hello world!";
|
||||
|
||||
document.getElementById("example").innerHTML = myvariable;
|
||||
</[script][13]>
|
||||
|
||||
</[body][9]>
|
||||
</[html][6]>
|
||||
```
|
||||
|
||||
Reload the page in your browser.
|
||||
|
||||
![HTML with JavaScript displayed in browser][14]
|
||||
|
||||
(Seth Kenlon, [CC BY-SA 4.0][12])
|
||||
|
||||
As you can see, the `<p>` tag as written still contains the string "Nothing here," but when it's rendered, JavaScript alters it so that it contains "Hello world" instead. Yes, JavaScript has the power to rebuild (or just help build) a webpage.
|
||||
|
||||
The JavaScript in this simple script does two things. First, it creates a variable called `myvariable` and places the string "Hello world!" into it. Finally, it searches the current document (the web page as the browser is rendering it) for any HTML element with the ID `example`. When it locates `example`, it uses the `innerHTML` function to replace the contents of the HTML element with the contents of `myvariable`.
|
||||
|
||||
Of course, using a custom variable isn't necessary. It's just as easy to populate the HTML element with something being dynamically created. For instance, you could populate it with a timestamp:
|
||||
|
||||
|
||||
```
|
||||
<[html][6]>
|
||||
<[head][7]>
|
||||
<[title][8]>JS</[title][8]>
|
||||
</[head][7]>
|
||||
<[body][9]>
|
||||
<[p][10] id="example">Date and time appears here.</[p][10]>
|
||||
|
||||
<[script][13]>
|
||||
document.getElementById("example").innerHTML = Date();
|
||||
</[script][13]>
|
||||
|
||||
</[body][9]>
|
||||
</[html][6]>
|
||||
```
|
||||
|
||||
Reload the page to see a timestamp generated at the moment the page is rendered. Reload a few times to watch the seconds increment.
|
||||
|
||||
### JavaScript syntax
|
||||
|
||||
In programming, **syntax** refers to the rules of how sentences (or "lines") are written. In JavaScript, each line of code must end in a semicolon (`;`) so that the JavaScript engine running your code understands when to stop reading.
|
||||
|
||||
Words (or "strings") must be enclosed in quotation marks (`"`), while numbers (or "integers") go without.
|
||||
|
||||
Almost everything else is a convention of the JavaScript language, such as variables, arrays, conditional statements, objects, functions, and so on.
|
||||
|
||||
### Creating variables in JavaScript
|
||||
|
||||
Variables are containers for data. You can think of a variable as a box where you can put data to share with your program. Creating a variable in JavaScript is done with two keywords you choose based on how you intend to use the variable: `let` and `var`. The `var` keyword denotes a variable intended for your entire program to use, while `let` creates variables for specific purposes, usually inside functions or loops.
|
||||
|
||||
JavaScript's built-in `typeof` function can help you identify what kind of data a variable contains. Using the first example, you can find out what kind of data `myvariable` contains by modifying the displayed text to:
|
||||
|
||||
|
||||
```
|
||||
<string>
|
||||
let myvariable = "Hello world!";
|
||||
document.getElementById("example").innerHTML = typeof(myvariable);
|
||||
</string>
|
||||
```
|
||||
|
||||
This renders "string" in your web browser because the variable contains "Hello world!" Storing different kinds of data (such as an integer) in `myvariable` would cause a different data type to be printed to your sample web page. Try changing the contents of `myvariable` to your favorite number and then reloading the page.
|
||||
|
||||
### Creating functions in JavaScript
|
||||
|
||||
Functions in programming are self-contained data processors. They're what makes programming _modular_. It's because functions exist that programmers can write generic libraries that, for instance, resize images or keep track of the passage of time for other programmers (like you) to use in their own code.
|
||||
|
||||
You create a function by providing a custom name for your function followed by any amount of code enclosed within braces.
|
||||
|
||||
Here's a simple web page featuring a resized image and a button that analyzes the image and returns the true image dimensions. In this example code, the `<button>` HTML element uses the built-in JavaScript function `onclick` to detect user interaction, which triggers a custom function called `get_size`:
|
||||
|
||||
|
||||
```
|
||||
<[html][6]>
|
||||
<[head][7]>
|
||||
<[title][8]>Imager</[title][8]>
|
||||
</[head][7]>
|
||||
<[body][9]>
|
||||
|
||||
<[div][15]>
|
||||
<[button][16] onclick="get_size(document.getElementById('myimg'))">
|
||||
Get image size
|
||||
</[button][16]>
|
||||
</[div][15]>
|
||||
|
||||
<[div][15]>
|
||||
<[img][17] style="width: 15%" id="myimg" src="penguin.png" />
|
||||
</[div][15]>
|
||||
|
||||
<[script][13]>
|
||||
function get_size(i) {
|
||||
let w = i.naturalWidth;
|
||||
let h = i.naturalHeight;
|
||||
alert(w + " by " + h);
|
||||
}
|
||||
</[script][13]>
|
||||
|
||||
</[body][9]>
|
||||
</[html][6]>
|
||||
```
|
||||
|
||||
Save the file and load it into your web browser to try the code.
|
||||
|
||||
![Custom get_size function returns image dimensions][18]
|
||||
|
||||
(Seth Kenlon, [CC BY-SA 4.0][12])
|
||||
|
||||
### Cross-platform apps with JavaScript
|
||||
|
||||
You can see from the code sample how JavaScript and HTML work closely together to create a cohesive user experience. This is one of the great strengths of JavaScript. When you write code in JavaScript, you inherit one of the most common user interfaces of modern computing regardless of platform: the web browser. Your code is cross-platform by nature, so your application, whether it's just a humble image size analyzer or a complex image editor, video game, or whatever else you dream up, can be used by everyone with a web browser (or a desktop, if you deliver an Electron app).
|
||||
|
||||
Learning JavaScript is easy and fun. There are lots of websites with tutorials available. There are also over a million JavaScript libraries to help you interface with devices, peripherals, the Internet of Things, servers, file systems, and lots more. And as you're learning, keep our [**JavaScript cheat sheet**][19] close by so you remember the fine details of syntax and structure.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/21/7/javascript-cheat-sheet
|
||||
|
||||
作者:[Seth Kenlon][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[lixin555](https://github.com/lixin555)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/seth
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/code2.png?itok=JCJTJszs (Code with javascript on white background)
|
||||
[2]: https://www.electronjs.org/
|
||||
[3]: https://opensource.com/article/16/12/notepad-text-editor
|
||||
[4]: https://opensource.com/article/20/12/atom
|
||||
[5]: https://opensource.com/article/20/6/open-source-alternatives-vs-code
|
||||
[6]: http://december.com/html/4/element/html.html
|
||||
[7]: http://december.com/html/4/element/head.html
|
||||
[8]: http://december.com/html/4/element/title.html
|
||||
[9]: http://december.com/html/4/element/body.html
|
||||
[10]: http://december.com/html/4/element/p.html
|
||||
[11]: https://opensource.com/sites/default/files/pictures/plain-html.jpg (HTML displayed in browser)
|
||||
[12]: https://creativecommons.org/licenses/by-sa/4.0/
|
||||
[13]: http://december.com/html/4/element/script.html
|
||||
[14]: https://opensource.com/sites/default/files/uploads/html-javascript.jpg (HTML with JavaScript displayed in browser)
|
||||
[15]: http://december.com/html/4/element/div.html
|
||||
[16]: http://december.com/html/4/element/button.html
|
||||
[17]: http://december.com/html/4/element/img.html
|
||||
[18]: https://opensource.com/sites/default/files/uploads/get-size.jpg (Custom get_size function returns image dimensions)
|
||||
[19]: https://opensource.com/downloads/javascript-cheat-sheet
|
@ -1,148 +0,0 @@
|
||||
[#]: subject: "10 Features Why GNOME 42 is the Greatest Release Ever"
|
||||
[#]: via: "https://www.debugpoint.com/2022/03/gnome-42-release/"
|
||||
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
10 Features Why GNOME 42 is the Greatest Release Ever
|
||||
======
|
||||
We think these GNOME 42 release features make it one of the great releases in GNOME’s history. Here’s why.
|
||||
|
||||
The GNOME Desktop is the most widely used desktop environment today. And it is probably the only desktop that new users to Linux experience for the first time. GNOME is the default desktop environment for Ubuntu and Fedora Linux. Hence its user base is in millions.
|
||||
|
||||
The upcoming GNOME 42 releases soon. And perhaps it’s one of the best releases so far in terms of new features, adoption of modern tech and moving away from the legacy codebase.
|
||||
|
||||
The core, look and feel under the hood changes – everything looks different for new and experienced users.
|
||||
|
||||
![GNOME 42 Desktop][1]
|
||||
|
||||
In this article, we would like to give you a tour of 10 features of GNOME 42, which makes it a significant release.
|
||||
|
||||
### Great Features of GNOME 42 Release
|
||||
|
||||
#### 1. Libadwaita and GTK4
|
||||
|
||||
The libadwaita library is the modern building block for GTK4 applications. It’s the GTK4 port of the libhandy library that defines the visual language of the GNOME desktop. The adoption of libadwaita is complex, and it impacts almost every modules component of the modern GNOME desktop, including the native applications. Imagine how difficult it is for a complete libadwaita and GTK4 adoption in development efforts, testing and other regressions.
|
||||
|
||||
The work started in GNOME 41 is now nearing completion in this GNOME 42 release. But what are the changes?
|
||||
|
||||
The libadwaita and GTK4 changes are visible in every user interface of the entire desktop. For example, you can see the flat buttons, well-justified labels, new colours, rounded corners, refined controls, etc.
|
||||
|
||||
Hence, from Files to Web, the Shell controls, menu items – everything would look stunning with libadwaita and GTK4 in the GNOME 42 release.
|
||||
|
||||
#### 2. Updated GNOME Shell Theme
|
||||
|
||||
The GNOME default Shell theme changed in several places. In this release, those items’ menus, notifications, and overall look are more compact.
|
||||
|
||||
The menu items at the top bar, such as the Calendar or the system tray menu, are now closer to the top bar. The spacing between the text and options inside the menu is decreased.
|
||||
|
||||
![GNOME 42 Shell updates][2]
|
||||
|
||||
The on-screen display notifications are changed. Earlier, it used to be the large boxes with notification labels that are now changed to “pills” with a lesser display footprint.
|
||||
|
||||
![Revamped OSD and menu in GNOME 42][3]
|
||||
|
||||
And also, some inside performance boost makes GNOME 42 much faster than its predecessors.
|
||||
|
||||
#### 3. Adaptive Dark Theme
|
||||
|
||||
If you love dark themes and want your app to honour the system’s dark look, you are in for a treat. The GNOME 42, with the help of libadwaita, brings native dark mode for all the supported applications.
|
||||
|
||||
If you choose a dark theme for GNOME Shell, the apps also follow that shell’s system style.
|
||||
|
||||
For example, if you choose the below option in the new Text editor, it changes to a dark theme when you change the GNOME Shell theme.
|
||||
|
||||
![This option makes it follow dark and light theme automatically][4]
|
||||
|
||||
However, this feature needs to be implemented by the app developer to consume the exposed Shell settings.
|
||||
|
||||
#### 4. Revamped System Settings with new Appearances
|
||||
|
||||
The fulcrum of the entire GNOME desktop is its settings window. From the settings window, you can tweak most of the desktop behaviour. The setting application itself is a complex app, and it’s ported to libadwaita. So, the looks of it changed with new styled widgets and controls.
|
||||
|
||||
One of the vital changes in the Settings window is the new Appearance page. This page gives you the option to view and toggle the desktop theme between light and dark.
|
||||
|
||||
The Sharing page in the settings window gives you a redesigned remote desktop dialog showing options and preferences for remote desktop connection via RDP (not VNC).
|
||||
|
||||
![Appearance page in Settings][5]
|
||||
|
||||
#### 5. Wallpaper that switches automatically with theme
|
||||
|
||||
The above appearance page in settings also gives you a nice side-by-side look of the light and dark version. And when you change the system theme, the wallpaper also changes automatically! This is by far the most remarkable feature that GNOME 42 release brings.
|
||||
|
||||
#### 6. Files icon change
|
||||
|
||||
The default folder icons in Files (Nautilus) didn’t change for many years. In my opinion, everything changed over the years, but this piece remains the same. In GNOME 42, the folder icons colour in the Files file manager changes to light blue.
|
||||
|
||||
Arguably, blue might not be the best colour considering every aspect. But blue still goes well with GNOME’s default wallpaper and other component pallets. And a change to the default Files look is always welcome.
|
||||
|
||||
![Files with new color folders in GNOME 42][6]
|
||||
|
||||
#### 7. A brand new text editor
|
||||
|
||||
A new Text Editor replaces the famous and fabulous Gedit in GNOME 42. The Gedit is a powerful and time-tested utility, and replacing all of its functionality takes time. The new Text Editor is built in GTK4 from scratch and brings some outstanding features, including built-in themes and light and dark mode. More features are expected to arrive in Text Editor in future.
|
||||
|
||||
To be clear, Gedit doesn’t go away. It’s still there in the respective Linux distribution’s repo, and you can install it whatever you want.
|
||||
|
||||
You can read our exclusive piece on Gedit and GNOME Text Editor below.
|
||||
|
||||
[Features about GNOME Text Editor][7]
|
||||
|
||||
[Why Gedit is the great text editor][8]
|
||||
|
||||
#### 8. A native screenshot tool
|
||||
|
||||
One of the best features of the GNOME 42 release is the built-in screenshot and screen recording tool. You do not install any additional app for this. Your life will be easier with this tool, which takes care of the screenshot and screen recording with its nifty user interface when you press the `Print Screen` button.
|
||||
|
||||
In earlier releases, hitting the Print Screen takes the entire desktop screenshot and saves it. Now, you need to hit Enter key after pressing Print Screen from the keyboard.
|
||||
|
||||
![GNOME 42 introduces new screenshot tool][9]
|
||||
|
||||
#### 9. Stunning Wallpapers
|
||||
|
||||
A set of awesome wallpapers is about to treat you and give your favourite GNOME 42 desktop a visual uplift. And the wallpapers also have a dark version, which is set automatically when you choose dark over light.
|
||||
|
||||
#### 10. Other Changes
|
||||
|
||||
Some of the misc changes in the GNOME 42 release is the Eye of GNOME (image viewer) received a much-needed performance boost, Web browser GNOME Web now support hardware acceleration and user interface update in Maps. Also, a new Console application is a nice add on to this release which replaces GNOME Terminal.
|
||||
|
||||
So, that’s about significant changes. But many changes make GNOME 42 release is one of the biggest releases in its history.
|
||||
|
||||
### How to get GNOME 42
|
||||
|
||||
GNOME 42 [was released on March 23, 2022][10], and you get to experience it via [GNOME OS][11] right away.
|
||||
|
||||
If you plan to get it via Linux Distribution, you have to wait for a little. [Ubuntu 22.04 LTS][12] will feature GNOME 42 (partial), due April 2022. And [Fedora 36][13], which is expected in April as well.
|
||||
|
||||
If you are an Arch Linux user, GNOME 42 will arrive soon in the main extra repo. Keep a watch on [this page][14] or check your Arch system via the usual `pacman -Syu` command.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.debugpoint.com/2022/03/gnome-42-release/
|
||||
|
||||
作者:[Arindam][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.debugpoint.com/author/admin1/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://www.debugpoint.com/wp-content/uploads/2022/03/GNOME-42-Desktop.jpg
|
||||
[2]: https://www.debugpoint.com/wp-content/uploads/2022/03/GNOME-42-Shell-updates.jpg
|
||||
[3]: https://www.debugpoint.com/wp-content/uploads/2022/03/Revamped-OSD-and-menu-in-GNOME-42.jpg
|
||||
[4]: https://www.debugpoint.com/wp-content/uploads/2022/03/This-option-makes-it-folow-dar-and-light-theme-automatically.jpg
|
||||
[5]: https://www.debugpoint.com/wp-content/uploads/2022/03/Appearance-page-in-Settings.jpg
|
||||
[6]: https://www.debugpoint.com/wp-content/uploads/2022/03/Files-with-new-color-folders-in-GNOME-42.jpg
|
||||
[7]: https://www.debugpoint.com/2021/12/gnome-text-editor/
|
||||
[8]: https://www.debugpoint.com/2021/04/gedit-features/
|
||||
[9]: https://www.debugpoint.com/wp-content/uploads/2022/03/GNOME-42-introduces-new-screenshot-tool.jpg
|
||||
[10]: https://release.gnome.org/42/
|
||||
[11]: https://os.gnome.org/
|
||||
[12]: https://www.debugpoint.com/2022/01/ubuntu-22-04-lts/
|
||||
[13]: https://www.debugpoint.com/2022/02/fedora-36/
|
||||
[14]: https://archlinux.org/groups/x86_64/gnome/
|
@ -1,193 +0,0 @@
|
||||
[#]: subject: "10 Things to Do After Installing Ubuntu 22.04 [With Bonus Tip]"
|
||||
[#]: via: "https://www.debugpoint.com/2022/04/10-things-to-do-ubuntu-22-04-after-install/"
|
||||
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
10 Things to Do After Installing Ubuntu 22.04 [With Bonus Tip]
|
||||
======
|
||||
You may want to try a summary of 10 things after installing Ubuntu 22.04 LTS “Jammy Jellyfish” (GNOME Edition).
|
||||
|
||||
I am sure you are excited to experience the brand new Ubuntu 22.04 LTS and its shiny new features. If you have already installed or upgraded from the prior release, you may want to customise your system before you start using it. Although the customisations are subjective and vary with use cases. However, we give you 10 pointers that you can do after installing Ubuntu 22.04 LTS. I hope it helps.
|
||||
|
||||
### 10 Things to Do After Installing Ubuntu 22.04
|
||||
|
||||
#### 1. Update Your System
|
||||
|
||||
Firstly, you should do some housekeeping after installing Ubuntu 22.04 LTS. Before you begin using the new system and configuring it, ensure that it is up to date with the latest packages from the Ubuntu Jammy repo. So, open a terminal window and run the below commands. Or, open Software Updater from the search.
|
||||
|
||||
```
|
||||
sudo apt update && sudo apt upgrade
|
||||
```
|
||||
|
||||
![Update your Ubuntu 22.04 LTS System][1]
|
||||
|
||||
Software application takes some time to load for the first time; hence you must do it as a number one step to save time later. It is best if you wait until the update finishes. Once the update is complete, open the Software App and ensure it completes downloading the app metadata.
|
||||
|
||||
Finally, when everything completes, reboot your system to proceed.
|
||||
|
||||
#### 2. Opt-In/Opt-Out from data collection and history settings
|
||||
|
||||
Secondly, it’s essential to review the privacy settings before using the system. Because we are all concerned about our usage data, location tracking, etc. So, to check them, open Settings from search and go to Privacy. The items you should review are Location Services and File History usage in your system. Make sure to change them as per your need.
|
||||
|
||||
![Review the privacy settings][2]
|
||||
|
||||
#### 3. Configure KB shortcuts
|
||||
|
||||
To effectively use Ubuntu 22.04 system, keyboard shortcuts are essential. It helps your work faster. So, ideally, keyboard shortcuts are pre-configured, but you may want to change them based on your habits from `Settings > Keyboard > View and Customize Shortcuts`.
|
||||
|
||||
![Configure Keyboard shortcuts in Ubuntu 22.04][3]
|
||||
|
||||
#### 4. Prepare for the backup
|
||||
|
||||
If you plan to use the system for a longer duration, it is super important to create a system checkpoint just after installation. Because in the future, if something goes wrong, you can always revert to your system as a fresh install.
|
||||
|
||||
Ubuntu 22.04 comes with the built-in backup tool – Backups. You can go ahead and use it to create a system checkpoint.
|
||||
|
||||
However, we recommend you use the great backup and restore tool TImeshift. It has many additional options and is well documented for heavy usage. To install Timeshift, you can use software or the terminal commands mentioned below.
|
||||
|
||||
As of writing this post, this Timeshift PPA is yet to be updated for Jammy Jellyfish. So, I would recommend you wait for a couple of days to install it via PPA. You can also monitor PPA updates [here][4]. You can always use the built-in backup tool as mentioned above.
|
||||
|
||||
After installation, launch Timeshift and follow the on-screen instructions to create a system restore point.
|
||||
|
||||
```
|
||||
sudo add-apt-repository -y ppa:teejee2008/ppasudo apt-get updatesudo apt-get install timeshift
|
||||
```
|
||||
|
||||
#### 5. Explore the New Features
|
||||
|
||||
Once you complete the above set of housekeepings, it’s time for you to explore the new features of Ubuntu 22.04. We covered the unique features of Ubuntu 22.04 and its flavours in detail in dedicated posts. You may want to check them out below.
|
||||
|
||||
* [Ubuntu 22.04 LTS – GNOME][5]
|
||||
* [Ubuntu MATE 22.04 LTS][6]
|
||||
* [Kubuntu 22.04 LTS][7]
|
||||
* [Xubuntu 22.04 LTS][8]
|
||||
* [Ubuntu Budgie 22.04 LTS][9]
|
||||
* [Lubuntu 22.04 LTS][10]
|
||||
* [Ubuntu Kylin 22.04 LTS][11]
|
||||
* [Ubuntu Studio 22.04 LTS][12]
|
||||
* [Ubuntu 20.04 vs Ubuntu 22.04 – Differences][13]
|
||||
|
||||
#### 6. Experience the first-ever Accent Colour in Ubuntu
|
||||
|
||||
In addition to the above items, you may find the new accent colour interesting in this release. This is one of the new features which was due for a long time. So, in the Appearance settings, you can find the selected colour options.
|
||||
|
||||
You can choose your favourite colour and see the selection, the folder icon gradient changes with the colour. However, you can not select the custom colour at the moment. I am sure it will eventually come up in future releases.
|
||||
|
||||
![How Accent colour change impact looks in Ubuntu 22.04 LTS][14]
|
||||
|
||||
#### 7. Dark Mode and new controls
|
||||
|
||||
Besides that accent colour, this release, alongside GNOME 42, brings new style changes, thanks to GTK4 and libadwaita adoption. With this change, the built-in dark mode can apply across the desktop and application that supports it. Also, the controls such as buttons, notifications, rounded corners, scroll bars, etc. all are more stylish and compact in this release.
|
||||
|
||||
All of these together make this release a beautiful one.
|
||||
|
||||
#### 8. Install GNOME Extensions
|
||||
|
||||
Additionally, you can take advantage of hundreds of excellent GNOME Extensions available. For example, you may want to customise the default Dock, Or, like a super cool blur effect, etc. – you can quickly achieve these using the extensions.
|
||||
|
||||
We list here some of the exciting extensions you may want to try out after installing this release.
|
||||
|
||||
* [Blur My Shell][15] – get an exciting blur effect on the default shell
|
||||
* [Floating Dock][16] – make your dock float wherever you want
|
||||
* Dash to Dock: Enables you to control your Dash across the screen with various options.
|
||||
* Caffeine: Enables you more productively.
|
||||
* [Time ++][17]: Super handy extension to give you an alarm clock, stopwatch, time tracker, Pomodoro, and todo.txt manager – all together.
|
||||
* [NetSpeed][18]: Show your internet download and upload speed in the system tray.
|
||||
|
||||
Before installing the above extensions, open a terminal prompt and install the chrome-gnome-shell using the below command to enable extensions.
|
||||
|
||||
```
|
||||
sudo apt-get install chrome-gnome-shell
|
||||
```
|
||||
|
||||
Then go to [https://extensions.gnome.org][19] and enable the extensions for Firefox.
|
||||
|
||||
If you use the Snap version of Firefox, then the extension connectivity won’t work. So, uninstall the Firefox Snap version and [use an alternate installation][20] Or use a different browser (Such as Google Chrome, Chromium) that has a .deb version. Or, install the extension using the manual steps [outlined here in this article][21].
|
||||
|
||||
#### 9. Configure Email Client
|
||||
|
||||
Moreover, a native desktop email client is always preferable over browser-based email access. Hence, I would recommend you configure Thunderbird with your email service provider. The setup is more straightforward and wizard-driven. It helps for offline and drafting work for heavy email users.
|
||||
|
||||
Alternatively, if you do not like Thunderbird, try to check out options – you can read our list of [top free native Linux desktop email clients list][22] and choose your favourite.
|
||||
|
||||
#### 10. Install some additional packages and Software
|
||||
|
||||
In addition to the above items, you should install some additional packages and software because Ubuntu doesn’t come with extra apps other than the native GNOME applications. We list here some of the important applications needed for basic desktop usage.
|
||||
|
||||
You can install them using the Software application.
|
||||
|
||||
* GIMP – Advanced photo editor
|
||||
* VLC – Media play that plays anything without the need for additional codecs
|
||||
* Google Chrome – Browser for Google users.
|
||||
* Leafpad – A lightweight text editor (even lightweight from default gedit)
|
||||
* Synaptic – A far better package manager
|
||||
|
||||
Moreover, while installing Ubuntu, if you have not selected to install the restricted software to play audio and video media files, you can do it now. Because GNOME default Video player (Totem) can not play the basic mp4, etc. files without restricted software.
|
||||
|
||||
So, to install them, open the terminal and run the below command to install.
|
||||
|
||||
```
|
||||
sudo apt install ubuntu-restricted-extras
|
||||
```
|
||||
|
||||
You can now play most video/audio files without any problem in Ubuntu.
|
||||
|
||||
#### Bonus Tip 💡
|
||||
|
||||
Finally, I recommend you set up Flatpak the first time after installing Ubuntu 22.04 LTS. Because over time, I am sure you would install many Flatpak applications.
|
||||
|
||||
To set up Flatpak, [visit this page][23] and follow the instructions.
|
||||
|
||||
Once you complete the setup, I recommend installing the below two Flatpak apps. The Extension application helps you manage the GNOME Extensions installed in your system. Other than that, the Flatseal application helps you manage Flatpak applications’ permissions in a super friendly way.
|
||||
|
||||
* [Flatseal][24] – Manage Flatpak permissions
|
||||
* [Extensions][25] – Manage GNOME extensions
|
||||
|
||||
### Summary
|
||||
|
||||
Also, one of the crucial debatable things to do after installing Ubuntu 22.04 is to delete Snap. Deleting Snap is a bit advanced process and may lead to an unstable system because of the tight coupling of Snap in Ubuntu.
|
||||
|
||||
That said, I hope this list gives you and new users of Ubuntu some idea about making a productive Ubuntu 22.04 LTS desktop.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.debugpoint.com/2022/04/10-things-to-do-ubuntu-22-04-after-install/
|
||||
|
||||
作者:[Arindam][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.debugpoint.com/author/admin1/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://www.debugpoint.com/wp-content/uploads/2022/04/Update-your-Ubuntu-22.04-LTS-System.jpg
|
||||
[2]: https://www.debugpoint.com/wp-content/uploads/2022/04/Review-the-privacy-settings.jpg
|
||||
[3]: https://www.debugpoint.com/wp-content/uploads/2022/04/Configure-Keyboard-shortcuts-in-Ubuntu-22.04.jpg
|
||||
[4]: https://launchpad.net/~teejee2008/+archive/ubuntu/timeshift/+packages
|
||||
[5]: https://www.debugpoint.com/2022/01/ubuntu-22-04-lts/
|
||||
[6]: https://www.debugpoint.com/2022/04/ubuntu-mate-22-04-lts/
|
||||
[7]: https://www.debugpoint.com/2022/04/kubuntu-22-04-lts/
|
||||
[8]: https://www.debugpoint.com/2022/04/xubuntu-22-04-lts/
|
||||
[9]: https://www.debugpoint.com/2022/04/ubuntu-budgie-22-04-lts/
|
||||
[10]: https://www.debugpoint.com/2022/04/lubuntu-22-04-lts/
|
||||
[11]: https://www.debugpoint.com/2022/04/ubuntu-kylin-22-04-lts/
|
||||
[12]: https://www.debugpoint.com/2022/04/ubuntu-studio-22-04-lts/
|
||||
[13]: https://www.debugpoint.com/2022/04/difference-ubuntu-22-04-20-04/
|
||||
[14]: https://www.debugpoint.com/wp-content/uploads/2022/04/How-Accent-colour-change-impact-looks-in-Ubuntu-22.04-LTS.jpg
|
||||
[15]: https://extensions.gnome.org/extension/3193/blur-my-shell/
|
||||
[16]: https://extensions.gnome.org/extension/3730/floating-dock/
|
||||
[17]: https://extensions.gnome.org/extension/1238/time/
|
||||
[18]: https://extensions.gnome.org/extension/104/netspeed/
|
||||
[19]: https://extensions.gnome.org/
|
||||
[20]: https://www.debugpoint.com/2021/09/remove-firefox-snap-ubuntu/
|
||||
[21]: https://www.debugpoint.com/2021/10/manual-installation-gnome-extension/
|
||||
[22]: https://www.debugpoint.com/2019/06/best-email-client-linux-windows/
|
||||
[23]: https://flatpak.org/setup/
|
||||
[24]: https://flathub.org/apps/details/com.github.tchx84.Flatseal
|
||||
[25]: https://flathub.org/apps/details/org.gnome.Extensions
|
@ -1,196 +0,0 @@
|
||||
[#]: subject: "Ubuntu 20.04 vs 22.04: What Has Changed Between the Two LTS Releases?"
|
||||
[#]: via: "https://itsfoss.com/ubuntu-20-04-vs-22-04/"
|
||||
[#]: author: "Ankush Das https://itsfoss.com/author/ankush/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Ubuntu 20.04 vs 22.04: What Has Changed Between the Two LTS Releases?
|
||||
======
|
||||
|
||||
Ubuntu 20.04 was an impressive release with a [list of exciting features][1].
|
||||
|
||||
Even with GNOME 3.36 on board, we had a fair share of visual upgrades. Now, Ubuntu 22.04 LTS comes packed with GNOME 42. So, naturally, there should be a variety of visual refinements.
|
||||
|
||||
Not just limited to the look and feel, [Ubuntu 22.04 LTS has numerous interesting features][2] to offer as well.
|
||||
|
||||
Here, I try to compare the feature offerings between the two to help you decide if you should upgrade.
|
||||
|
||||
### 1\. Support Lifespan
|
||||
|
||||
Undoubtedly, both being LTS ([Long-Term Release][3]) versions, you can pick any of them and still be able to use them for a couple of years, at the very least.
|
||||
|
||||
To be accurate, Ubuntu 22.04 will be supported with maintenance updates for **five years** until **April 2027**.
|
||||
|
||||
And, Ubuntu 20.04 LTS will be supported until **2025**, meaning, you have **three more years** of software update support.
|
||||
|
||||
### 2\. Logo and Branding
|
||||
|
||||
Ubuntu’s branding focused on a purple accent for some elements like toggles, sliders, etc. on Ubuntu 20.04 LTS.
|
||||
|
||||
However, with Ubuntu 22.04 LTS, they focused on a different accent color with changes to the icon theme as well.
|
||||
|
||||
Not to forget, the [new Ubuntu 22.04 logo looks weird][4], and as of now, we do not have a proper logo file available to use on images.
|
||||
|
||||
The logo associated with Ubuntu 20.04 was clean, without any solid rectangle structure attached to it.
|
||||
|
||||
![][5]
|
||||
|
||||
Accordingly, the boot animation has changed as well, reflecting the latest branding.
|
||||
|
||||
### 3\. Accent Color Selection
|
||||
|
||||
With Ubuntu 20.04, you couldn’t select custom accent colors. You had to stick with the default or customize things yourself with [GNOME Tweaks][6].
|
||||
|
||||
![Ubuntu 20.04 vs Ubuntu 22.04 \(Appearance setting\)][7]
|
||||
|
||||
However, that changes with Ubuntu 22.04 LTS, you can finally [select additional accent colors in Ubuntu 22.04 LTS][8].
|
||||
|
||||
### 4\. Wallpapers
|
||||
|
||||
![Ubuntu 20.04 vs Ubuntu 22.04 \(Desktop featuring default wallpapers\)][9]
|
||||
|
||||
It is obvious to expect a new wallpaper that reflects the name of the Ubuntu upgrade.
|
||||
|
||||
Ubuntu 22.04 is code named as “**Jammy Jellyfish**“, so the new wallpaper illustrates the same beautifully:
|
||||
|
||||
On the other hand, Ubuntu 20.04 is code named “**Focal Fossa**”, which refers to a cat-like predator based found in Madagascar.
|
||||
|
||||
Both have similar color combinations, but I tend to like the new one.
|
||||
|
||||
### 5\. Log in Screen and Lock screen
|
||||
|
||||
As per the changes to the default theme and accent colors, the choices for the log-in and lock screen have differences.
|
||||
|
||||
Both of the lock screens offer a blurred view of the default wallpapers, with Ubuntu 20.04 turning out to be darker than Ubuntu 22.04.
|
||||
|
||||
![Ubuntu 20.04 vs Ubuntu 22.04 \(Lockscreen\)][10]
|
||||
|
||||
The log in screen is entirely different in Ubuntu 22.04 with a black background, here’s how it looks:
|
||||
|
||||
![Ubuntu 20.04 vs Ubuntu 22.04 \(Log in screen\)][11]
|
||||
|
||||
### 6\. Appearance Settings & Dark Mode Improvements
|
||||
|
||||
Ubuntu 20.04 did feature a dark mode to keep up with modern standards. With Ubuntu 22.04 LTS, the dark mode has improved to provide you with a complete system-wide dark mode experience.
|
||||
|
||||
![Ubuntu 20.04 vs Ubuntu 22.04 \(Appearance settings\)][12]
|
||||
|
||||
Along with the new dark mode implementation, you get to see an entire revamp for the appearance settings, giving you more options in an organized manner.
|
||||
|
||||
Furthermore, you can notice that Ubuntu 22.04 LTS no longer features the standard theme, so it’s either entirely light or dark.
|
||||
|
||||
### 7\. GNOME 42 and the horizontal layout
|
||||
|
||||
Ubuntu 20.04 makes use of GNOME 3.36.8 to provide a stable experience without a lot of appearance tweaks.
|
||||
|
||||
But, all thanks to GNOME 42, the dark mode improvements, appearance tweaks, it’s all part of the [GNOME 42 features][13].
|
||||
|
||||
Not just the visual changes, but the entire workflow should feel a bit different with the revamped activities view, app menu, and further adjustments:
|
||||
|
||||
![Ubuntu 20.04 vs Ubuntu 22.04 \(Activities\)][14]
|
||||
|
||||
The three finger swipe also provides a smooth and rich experience for accessing the activity overview.
|
||||
|
||||
Ubuntu 22.04 did not implement the horizontal dock. But, it’s still a significant change to offer something different for a good user experience.
|
||||
|
||||
The application menu also looks a tad different, including the virtual desktops in the same view compared to Ubuntu 20.04.
|
||||
|
||||
![Ubuntu 20.04 vs Ubuntu 22.04 \(App menu\)][15]
|
||||
|
||||
### 8\. Multitasking Capabilities
|
||||
|
||||
Ubuntu 22.04 now includes a dedicated menu in the system settings to facilitate enhancements to multitasking with the use of Hot Corner, Screen Edges, Workspace tweaks, and more.
|
||||
|
||||
![][16]
|
||||
|
||||
You do not find these options with Ubuntu 20.04 LTS.
|
||||
|
||||
### 9\. Linux kernel version
|
||||
|
||||
Ubuntu 22.04 features multiple Linux Kernel versions as per the product. Ubuntu 22.04 Desktop uses [Linux Kernel 5.17][17].
|
||||
|
||||
The desktop version also uses a rolling HWE kernel for previous-gen hardware based on Linux Kernel 5.15, to exist until the first point release.
|
||||
|
||||
Ubuntu 22.04 server uses non-rolling Linux Kernel 5.15 LTS.
|
||||
|
||||
On the other hand, Ubuntu 20.04.4, features [Linux Kernel 5.13][18] at the time of writing this.
|
||||
|
||||
### 10\. Shrinking the Dock in Ubuntu 22.04
|
||||
|
||||
Surprisingly, you can shrink the dock on Ubuntu 22.04 to change the default look. You need to disable the “Panel” mode under the Dock settings in Appearance tweaks, as shown in the image below:
|
||||
|
||||
![][19]
|
||||
|
||||
It may not be a massive change, but some do appreciate a compact dock, instead of having the dock stick to the entire left side of the screen, ditching the Unity-type look.
|
||||
|
||||
### 11\. Screenshot tool
|
||||
|
||||
Ubuntu 20.04 LTS utilized GNOME’s screenshot tool to get things done. It was a simple and effective tool.
|
||||
|
||||
![][20]
|
||||
|
||||
With GNOME 42 on board, Ubuntu 22.04 LTS has the latest screenshot tool and received upgrades to its UI with a modern layout, and the ability to record the screen as well.
|
||||
|
||||
### 12\. File Manager
|
||||
|
||||
The file manager has a refreshed look/feel compared to Ubuntu 20.04 LTS. Of course, the standard theme on Ubuntu 20.04 can no longer be seen with Ubuntu 22.04 LTS, so that’s a part of the visible change.
|
||||
|
||||
![][21]
|
||||
|
||||
### 13\. Software Center
|
||||
|
||||
Ubuntu 22.04 LTS features an improved software center that provides you more information on the software, clarifying the ratings, project details, download size, status, and more.
|
||||
|
||||
![][22]
|
||||
|
||||
Ubuntu 20.04 LTS did have improvements to it back then, but it is a simpler software center comparatively.
|
||||
|
||||
![Ubuntu 22.04 LTS \(Software Center\)][23]
|
||||
|
||||
### Wrapping Up
|
||||
|
||||
Ubuntu 22.04 LTS is certainly a major overhaul in terms of user experience compared to Ubuntu 20.04.
|
||||
|
||||
Some changes may not be as functional as they look, so as per your preferences, it is best to evaluate your requirements if you want to switch to the latest Ubuntu 22.04 LTS or stick to Ubuntu 20.04 LTS.
|
||||
|
||||
What do you think about the difference between the two LTS releases? Are the differences compelling enough for you to switch? Let me know your thoughts in the comments section below.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/ubuntu-20-04-vs-22-04/
|
||||
|
||||
作者:[Ankush Das][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://itsfoss.com/author/ankush/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://itsfoss.com/ubuntu-20-04-release-features/
|
||||
[2]: https://itsfoss.com/ubuntu-22-04-release-features/
|
||||
[3]: https://itsfoss.com/long-term-support-lts/
|
||||
[4]: https://news.itsfoss.com/ubuntu-new-logo/
|
||||
[5]: https://itsfoss.com/wp-content/uploads/2022/04/cof_orange_hex.jpg
|
||||
[6]: https://itsfoss.com/gnome-tweak-tool/
|
||||
[7]: https://itsfoss.com/wp-content/uploads/2022/04/ubuntu-20-04-appearance.jpg
|
||||
[8]: https://news.itsfoss.com/ubuntu-22-04-accent-color/
|
||||
[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/04/ubuntu-20-04-desktop.jpg?ssl=1
|
||||
[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2022/04/ubuntu-20-04-lockscreen-1.png?ssl=1
|
||||
[11]: https://itsfoss.com/wp-content/uploads/2022/04/login-screen.png
|
||||
[12]: https://itsfoss.com/wp-content/uploads/2022/04/ubuntu-20-04-dark-mode.jpg
|
||||
[13]: https://news.itsfoss.com/gnome-42-features/
|
||||
[14]: https://itsfoss.com/wp-content/uploads/2022/04/ubuntu-20-04-activities.jpg
|
||||
[15]: https://itsfoss.com/wp-content/uploads/2022/04/ubuntu-20-04-application-view.jpg
|
||||
[16]: https://itsfoss.com/wp-content/uploads/2022/04/ubuntu-22-04-multitasking.jpg
|
||||
[17]: https://news.itsfoss.com/linux-kernel-5-17-release/
|
||||
[18]: https://news.itsfoss.com/linux-kernel-5-13-release/
|
||||
[19]: https://itsfoss.com/wp-content/uploads/2022/04/ubuntu-22-04-dock-shrink.jpg
|
||||
[20]: https://itsfoss.com/wp-content/uploads/2022/04/ubuntu-20-04-screenshot.jpg
|
||||
[21]: https://itsfoss.com/wp-content/uploads/2022/04/filemanager.jpg
|
||||
[22]: https://itsfoss.com/wp-content/uploads/2022/04/ubuntu-20-04-software-center.jpg
|
||||
[23]: https://itsfoss.com/wp-content/uploads/2022/04/ubuntu-22-04-software.jpg
|
@ -1,346 +0,0 @@
|
||||
[#]: subject: "Things to do After Installing Ubuntu 22.04"
|
||||
[#]: via: "https://itsfoss.com/things-to-do-after-installing-ubuntu-22-04/"
|
||||
[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Things to do After Installing Ubuntu 22.04
|
||||
======
|
||||
|
||||
_**Here is a list of simple tweaks and things to do after installing Ubuntu 22.04, to get a smoother and better experience.**_
|
||||
|
||||
I presume that you are absolutely new to Ubuntu while sharing these tips. If you are an existing Ubuntu user, some tips may sound too elementary to you. However, you’ll still find a few good tweaks that are specific to the [new Ubuntu 22.04 features][1].
|
||||
|
||||
### Things to do after installing Ubuntu 22.04 LTS “Jammy Jellyfish”
|
||||
|
||||
Again, what I recommend here is based on my experience and preference. Yours could be different from mine. Skim around and see if you get some interesting and useful advice.
|
||||
|
||||
Another thing. Most of the suggestions are for the default GNOME desktop environment. If you are using the default Ubuntu, you should be good. If you have doubt, please [check the Ubuntu version][2] and [desktop environment you are using][3].
|
||||
|
||||
Let’s see them one by one.
|
||||
|
||||
#### 1\. Getting your system ready with updates and repositories
|
||||
|
||||
The first thing you should do after installing Ubuntu is to update it. Linux works on a local database of available packages and it needs to be synced for you to be able to install any software.
|
||||
|
||||
It is straightforward to [update Ubuntu][4]. You can run the software updater from the menu (press the Windows key and search for software updater):
|
||||
|
||||
![][5]
|
||||
|
||||
Now, make sure that you have [universe and multiverse repositories enabled][6]. These repositories should be enabled already, but no harm in verifying that. You’ll have access to a lot more software with these repositories.
|
||||
|
||||
Search for Software & Updates in the menu:
|
||||
|
||||
![][7]
|
||||
|
||||
Check the boxes in front of the repositories:
|
||||
|
||||
![][8]
|
||||
|
||||
#### 2\. Install media codecs to play various kinds of media files
|
||||
|
||||
To play media files like MP3, MPEG4, AVI, etc, you’ll need to install media codecs. Ubuntu doesn’t install it by default because of copyright issues in various countries.
|
||||
|
||||
You can install these media codecs as an individual [using the Ubuntu Restricted Extra package][9]. It installs media codecs and [Microsoft True Type Fonts on your Ubuntu system][10].
|
||||
|
||||
You can install it by using this command:
|
||||
|
||||
```
|
||||
|
||||
sudo apt install ubuntu-restricted-extras
|
||||
|
||||
```
|
||||
|
||||
If you encounter the EULA or the license screen, remember to use the tab key to select between the options and then hit enter to confirm your choice.
|
||||
|
||||
![Press tab to select OK and press enter][11]
|
||||
|
||||
#### 3\. Install applications of your choice from the software center or the web
|
||||
|
||||
A fresh installed Ubuntu system will have only a limited set of necessary applications installed.
|
||||
|
||||
For the rest, you can find them in the software center, through the apt package manager, or get them from their official websites.
|
||||
|
||||
Look into the software center first and see if the application is available here.
|
||||
|
||||
![][12]
|
||||
|
||||
Some applications provide an easy-to-use DEB file on their website. For example, to [install Google Chrome on Ubuntu][13], you can download it from its official website.
|
||||
|
||||
Usually, you double-click on the deb file and install the application using the software center. If it opens the deb file in archive manager, [use this trick][14] to make it work.
|
||||
|
||||
#### 4\. Enjoy gaming on Linux with Steam Proton
|
||||
|
||||
There are plenty of tools that allow you to play games on Linux. Steam is perhaps the most convenient, mainstream way of getting thousands of games.
|
||||
|
||||
[Install Steam on Ubuntu][15] and [enable Steam Play][16]. You should have access to a good set of games, provided your system has enough hardware configuration to run all kinds of games.
|
||||
|
||||
Needs some suggestions? Check this list of [indie games for Linux users][17].
|
||||
|
||||
#### 5\. Get familiar with auto-updates
|
||||
|
||||
Your Ubuntu system automatically checks for system updates and installs them automatically when needed.
|
||||
|
||||
This check happens when your system starts. If you try to perform a system update or install an application at this time, you’ll see a warning or message to wait.
|
||||
|
||||
You can control the auto-updates behavior if you like.
|
||||
|
||||
![][18]
|
||||
|
||||
#### 6\. Give your Ubuntu a different color
|
||||
|
||||
Ubuntu 22.04 gives you the ability to choose a different color than the usual orange. There are nine other colors to choose from. From the Settings-Appearance, select the color you want and it will give change the accent color of your system.
|
||||
|
||||
![][19]
|
||||
|
||||
#### 7\. Get familiar with the new screenshot tool
|
||||
|
||||
Ubuntu 22.04 has a new screenshot tool that also includes the screencast (video recording of desktop) option.
|
||||
|
||||
When you press the Print Screen button to take the screenshot, it opens the UI and gives you the option to take the screenshot of the selected area, entire screen, or current application window. The screenshots are copied to the clipboard and saved to the Screenshots folder under the Pictures directory.
|
||||
|
||||
![][20]
|
||||
|
||||
You can also record the screen with the screencast option available in the same interface (click the video camera icon). It lets you record the entire screen and works very well under Wayland.
|
||||
|
||||
#### 8\. Experiment with the dock
|
||||
|
||||
Go to the Appearance Settings and you’ll see the option for disabling Panel mode.
|
||||
|
||||
![][21]
|
||||
|
||||
This will shrink the launcher on the left side and make it look like the Vanilla GNOME launcher. You should use it with ‘auto-hide’ option for better experience.
|
||||
|
||||
You may [move the launcher to the bottom][22] or the right side if you like. There are plenty of [ways to customize the dock in Ubuntu][23].
|
||||
|
||||
#### 9\. Get GNOME Tweaks tool for additional customization
|
||||
|
||||
Though the system settings application now includes several new options, [GNOME Tweaks still provides additional customization options][24].
|
||||
|
||||
With GNOME Tweaks, you can move the windows control button on the left, change themes, change the lock screen background, etc. More on its usage later. For the moment, just get this tool from the software center or use the apt command.
|
||||
|
||||
![][25]
|
||||
|
||||
#### 10\. Minimize to click
|
||||
|
||||
When you click an icon in the launcher, it opens the application. You click the icon again and nothing happens.
|
||||
|
||||
I don’t like this. I prefer that when I click on the icon of an application in focus, it gets minimized.
|
||||
|
||||
If you share the same preference, use this command in the terminal to [enable minimize on click in Ubuntu][26]:
|
||||
|
||||
```
|
||||
|
||||
gsettings set org.gnome.shell.extensions.dash-to-dock click-action 'minimize'
|
||||
|
||||
```
|
||||
|
||||
#### 11\. Get familiar with the terminal
|
||||
|
||||
![][27]
|
||||
|
||||
Speaking of the terminal, please don’t be too scared of this awesome tool. I know that the command line gives cold feet to many new Linux users. However, knowing a little could help you big in long run.
|
||||
|
||||
I am not going to teach you the basics of the Linux command line here. Though I have written a pretty good post that tells you several [useful information on using the terminal in Ubuntu][28]. You should read the article even if you can use the terminal every now and then.
|
||||
|
||||
#### 12\. Few tweaks for laptop users
|
||||
|
||||
If you are using Ubuntu 22.04 on a laptop, here are a few tips on improving your performance and getting rid of annoyances.
|
||||
|
||||
You’ll notice that you have to press the left touchpad button for the left mouse button action. This is annoying. Enable the tap for click option and just tap the touchpad anywhere to get the left mouse click.
|
||||
|
||||
![][29]
|
||||
|
||||
From the Power settings, **enable the battery percentage display** to keep a track of the remaining battery on your laptop.
|
||||
|
||||
![][30]
|
||||
|
||||
Since you’ll be using your system on battery power, **choose an appropriate power profile** under the Power settings.
|
||||
|
||||
![][31]
|
||||
|
||||
This is perhaps not entirely for laptop users. By default, Ubuntu locks the screen after 5 minutes of inactivity and puts the system in suspend mode after 20 minutes of activity.
|
||||
|
||||
I don’t like entering my password so frequently. I **prefer to lock the screen at my convenience**. If you share the same feeling, you can also disable this behavior.
|
||||
|
||||
![][32]
|
||||
|
||||
#### 13\. Disable characters from GNOME search
|
||||
|
||||
The GNOME Search is an excellent tool for finding installed applications, files, etc. However, you’ll notice that it often shows matching ‘characters’.
|
||||
|
||||
![Emojis Desktop Search Ubuntu][33]
|
||||
|
||||
Actually, your Ubuntu system has built-in emoji support. Apart from the regular emoticons, the system also has support for letters in various languages like Thai, Latin, Vietnamese, etc.
|
||||
|
||||
When you search for something, the term could also match these special characters. Click on it and it gets copied to the clipboard and you can paste them wherever you want.
|
||||
|
||||
If you are not going to use this feature, you should disable the characters’ search.
|
||||
|
||||
![][34]
|
||||
|
||||
#### 14\. Use the night light feature to reduce eye strain at night
|
||||
|
||||
My favorite feature and I am glad it now works in the multi-monitor settings as well.
|
||||
|
||||
[Enable the night light feature][35] so that it adds a yellow tint to the screen which is less pinching than the white light at night.
|
||||
|
||||
Go to Settings -> Displays, switch to Night Light tab, and enable it. You can also set the ‘yellowness’ as per your liking.
|
||||
|
||||
![][36]
|
||||
|
||||
#### 15\. Enable fractional scaling if you’ve got a 4K screen
|
||||
|
||||
If you have a 2K or 4K screen, you’ll find that the icons, fonts and folders look too small. You should enable the fractional scaling and scale the size that suits your preference.
|
||||
|
||||
![][37]
|
||||
|
||||
#### 16\. Know that you have the option to go back to Xorg
|
||||
|
||||
Ubuntu 22.04 defaults to Wayland once again if you don’t have an Nvidia system. Wayland is the modern replacement of the legacy x server and it works very well with the newer GNOME components.
|
||||
|
||||
However, some older applications may not work properly under Wayland. For example, most screen recording tools don’t support Wayland yet.
|
||||
|
||||
If you encounter such a situation where a must-use application doesn’t work in Wayland, log out from the session and click on the gear icon in the bottom right to [switch to the X display session][38].
|
||||
|
||||
#### 17\. Classic GNOME is still available
|
||||
|
||||
Speaking of options, you can also access the classic GNOME. If you are not aware, the classic GNOME or GNOME version 2 was a popular desktop choice before GNOME 3 arrived with radical new changes around 2011.
|
||||
|
||||
GNOME 2 gave birth to the Cinnamon and MATE desktop environment because its die-hard users just didn’t want to give up on the classic interface. Perhaps that’s the reason why GNOME Classic has always been a part of Ubuntu even though it moved to Unity and (modern) GNOME.
|
||||
|
||||
Though it says classic, it doesn’t look as dated as it was in 2010.
|
||||
|
||||
![GNOME Classic][39]
|
||||
|
||||
When you log out of the system, click on the user name and you should see a gear symbol at the bottom. Click on it and you should see the classic GNOME option here.
|
||||
|
||||
#### 18\. Know about cleaning your system
|
||||
|
||||
The classic apt autoremove command is a good way to remove packages that are not required anymore.
|
||||
|
||||
```
|
||||
|
||||
sudo apt autoremove
|
||||
|
||||
```
|
||||
|
||||
I think it is also part of the software updater tool now meaning it runs the autoremove command after running updates or so I have noticed.
|
||||
|
||||
Apart from that, there are a [few more ways to clean up your Ubuntu system][40]. GUI tools like Stacer are now available in the repositories and you may use them to clean your system without going into the command line.
|
||||
|
||||
#### 19\. Master the keyboard shortcuts
|
||||
|
||||
I am not asking you to ditch the mouse altogether but trust me on this using the keyboard shortcut saves plenty of time.
|
||||
|
||||
From the application switcher to opening the terminal, things feel a lot faster with the correct shortcuts at your finger.
|
||||
|
||||
![keyboard switching with key shortcut in Ubuntu][41]
|
||||
|
||||
I have an entire article dedicated to [keyboard shortcuts in Ubuntu][42]. Feel free to check that out.
|
||||
|
||||
#### 20\. Use the ‘do not disturb mode to focus on work
|
||||
|
||||
There are plenty of productivity tools available for Ubuntu but this little hack is my favorite.
|
||||
|
||||
When I am working on something that requires my complete focus, like writing this article, I enable the Do Not Disturb mode.
|
||||
|
||||
![][43]
|
||||
|
||||
With that, the notifications from messaging services stop appearing on the screen and I don’t get distracted. Once I am back to relaxed working, I disable it again.
|
||||
|
||||
#### 21\. Get back the original Firefox or go for some other browser
|
||||
|
||||
Ubuntu 22.04 Jammy Jellyfish comes with the Snap version of Firefox. It takes longer to start and forces you to log in to the accounts again and again.
|
||||
|
||||
Try the Snap version of Firefox first. If it works for you, good. If not and you feel fed up with the Firefox experience, you have two options:
|
||||
|
||||
* Switch to another browser like Brave, Vivaldi, LibreWolf, etc
|
||||
* Switch to Firefox ESR or a non-Snap version of Firefox
|
||||
|
||||
|
||||
|
||||
Firefox ESR (extended support release) doesn’t come with the latest feature like the regular Firefox but it is maintained for security and stability fixes.
|
||||
|
||||
There are a couple of ways of [getting the non-Snap version of Firefox][44] as described by Jim at Ubuntu Handbook. However, it is slightly more complicated than just adding a PPA.
|
||||
|
||||
#### 22\. Get missing Windows back if you use a dual boot system
|
||||
|
||||
During the early testing of Ubuntu 22.04, I noticed a known bug that came with the new Grub 2.6. It had disabled the os-prober by default. This means that Grub won’t check for the presence of other operating systems. In other words, it won’t see Windows (or other Linux distributions) if you opted for a dual boot system.
|
||||
|
||||
Now, I haven’t checked if this issue has been fixed or not but if you face this issue with your dual boot system, then edit the /etc/default/grub file to add GRUB_DISABLE_OS_PROBER=false to this file. Save this file, [update grub][45] and Grub should see other operating systems now.
|
||||
|
||||
#### Where to go from here?
|
||||
|
||||
![][46]
|
||||
|
||||
Honestly, you could do a lot more even after you have done all the points I mentioned in this list here. There is no end to things you could do after installing Ubuntu 22.04.
|
||||
|
||||
If you are new, there is plenty to explore. If you are an experienced one, you could still spend considerable time tweaking and setting up your system as per your liking.
|
||||
|
||||
It all comes down to personal preference. Some people would just do some basic changes and go on with using the operating system. Some folks would spend hours setting everything to perfection.
|
||||
|
||||
Now that I have finished my recommendations, I would like your views. Did you find some useful tips here? What other usual stuff do you do after installing Ubuntu?
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/things-to-do-after-installing-ubuntu-22-04/
|
||||
|
||||
作者:[Abhishek Prakash][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://itsfoss.com/author/abhishek/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://itsfoss.com/ubuntu-22-04-release-features/
|
||||
[2]: https://itsfoss.com/how-to-know-ubuntu-unity-version/
|
||||
[3]: https://itsfoss.com/find-desktop-environment/
|
||||
[4]: https://itsfoss.com/update-ubuntu/
|
||||
[5]: https://itsfoss.com/wp-content/uploads/2022/04/software-updater-ubuntu-22-04.jpg
|
||||
[6]: https://itsfoss.com/ubuntu-repositories/
|
||||
[7]: https://itsfoss.com/wp-content/uploads/2022/04/software-and-updates-tool.jpg
|
||||
[8]: https://itsfoss.com/wp-content/uploads/2022/04/enable-additional-repo-ubuntu-22-04.jpg
|
||||
[9]: https://itsfoss.com/install-media-codecs-ubuntu/
|
||||
[10]: https://itsfoss.com/install-microsoft-fonts-ubuntu/
|
||||
[11]: https://itsfoss.com/wp-content/uploads/2020/02/installing_ubuntu_restricted_extras.jpg
|
||||
[12]: https://itsfoss.com/wp-content/uploads/2022/04/ubuntu-software-center-22-04-800x539.png
|
||||
[13]: https://itsfoss.com/install-chrome-ubuntu/
|
||||
[14]: https://itsfoss.com/cant-install-deb-file-ubuntu/
|
||||
[15]: https://itsfoss.com/install-steam-ubuntu-linux/
|
||||
[16]: https://itsfoss.com/steam-play/
|
||||
[17]: https://itsfoss.com/best-indie-rpg-games-linux/
|
||||
[18]: https://itsfoss.com/wp-content/uploads/2020/04/auto-updates-ubuntu-800x361.png
|
||||
[19]: https://itsfoss.com/wp-content/uploads/2022/03/ubuntu-22-04-appearance-settings.png
|
||||
[20]: https://news.itsfoss.com/wp-content/uploads/2022/03/ubuntu-22-04-screenshot-ui.jpg
|
||||
[21]: https://itsfoss.com/wp-content/uploads/2022/04/panel-mode-ubuntu-22-800x529.png
|
||||
[22]: https://itsfoss.com/move-unity-launcher-bottom/
|
||||
[23]: https://itsfoss.com/customize-ubuntu-dock/
|
||||
[24]: https://itsfoss.com/gnome-tweak-tool/
|
||||
[25]: https://itsfoss.com/wp-content/uploads/2020/04/gnome-tweaks-tool-ubuntu-20-04-800x551.png
|
||||
[26]: https://itsfoss.com/click-to-minimize-ubuntu/
|
||||
[27]: https://itsfoss.com/wp-content/uploads/2021/12/linux-terminal-introduction.png
|
||||
[28]: https://itsfoss.com/basic-terminal-tips-ubuntu/
|
||||
[29]: https://itsfoss.com/wp-content/uploads/2022/04/tap-to-click-ubuntu-22-800x483.png
|
||||
[30]: https://itsfoss.com/wp-content/uploads/2022/04/show-battery-percentage-ubuntu-22-800x489.png
|
||||
[31]: https://itsfoss.com/wp-content/uploads/2022/04/ubuntu-22-04-new-power-profile-800x489.png
|
||||
[32]: https://itsfoss.com/wp-content/uploads/2022/04/Power-Settings-in-Ubuntu.jpg
|
||||
[33]: https://itsfoss.com/wp-content/uploads/2020/04/emojis-desktop-search-ubuntu.jpg
|
||||
[34]: https://itsfoss.com/wp-content/uploads/2020/04/search-settings-control-ubuntu-800x534.png
|
||||
[35]: https://itsfoss.com/night-shift-flux-ubuntu-linux/
|
||||
[36]: https://itsfoss.com/wp-content/uploads/2020/04/nightlight-ubuntu-20-04.png
|
||||
[37]: https://itsfoss.com/wp-content/uploads/2022/04/fractional-scaling-in-ubuntu-22-04-800x674.png
|
||||
[38]: https://itsfoss.com/switch-xorg-wayland/
|
||||
[39]: https://itsfoss.com/wp-content/uploads/2022/04/gnome-classic-ubuntu-22-800x450.png
|
||||
[40]: https://itsfoss.com/free-up-space-ubuntu-linux/
|
||||
[41]: https://itsfoss.com/wp-content/uploads/2022/02/keyboard-switch-shortcut-ubuntu.jpeg
|
||||
[42]: https://itsfoss.com/ubuntu-shortcuts/
|
||||
[43]: https://itsfoss.com/wp-content/uploads/2022/04/don-not-disturb-ubuntu-22.jpg
|
||||
[44]: https://ubuntuhandbook.org/index.php/2022/04/install-firefox-deb-ubuntu-22-04/
|
||||
[45]: https://itsfoss.com/update-grub/
|
||||
[46]: https://itsfoss.com/wp-content/uploads/2022/04/ubuntu-22-04-neofetch-lolcat-800x445.png
|
@ -1,46 +0,0 @@
|
||||
[#]: subject: "Following Musk’s Acquisition Of Twitter, An Open Source Alternative Is Exploding"
|
||||
[#]: via: "https://www.opensourceforu.com/2022/04/following-musks-acquisition-of-twitter-an-open-source-alternative-is-exploding/"
|
||||
[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Following Musk’s Acquisition Of Twitter, An Open Source Alternative Is Exploding
|
||||
======
|
||||
![220405-ROB-Elon-Musk-Twitter-jg-af752e][1]
|
||||
|
||||
Although we don’t yet know what Elon Musk’s acquisition of Twitter means for the platform, one Twitter alternative is already thriving as a result of the news. According to [Mastodon’s][2] founder, the open source social media platform that describes itself as the “biggest decentralised social network on the internet” has been “exploding” since Musk’s takeover.
|
||||
|
||||
Employees and users have been shaken by the news of Twitter’s purchase, since Musk has stated that he intends to take a much more hands-off approach to content management. As is customary when Twitter makes a contentious move, some users have vowed to abandon the platform, while opponents have pushed the hashtag #RIPTWITTER to the top of the search results.
|
||||
|
||||
In this scenario, at least some angry users appear to be considering Mastodon as a possible replacement. Mastodon says it experienced “an influx of approx. 41,287 users” hours after the Twitter takeover was revealed. In a blog post, Mastodon founder Eugen Rochko stated that roughly 30,000 of those were new users.
|
||||
|
||||
According to data from analytics firm Sensor Tower, Mastodon’s official iOS and Android apps are also witnessing an increase in usage. According to the company, the apps have been downloaded 5,000 times since Monday, “or about 10% of its lifetime total” downloads. On the App Store’s social media app charts, the app is presently placed No. 32.
|
||||
|
||||
This isn’t the first time Mastodon has benefited from Twitter’s problems. Following controversy over Twitter’s decision to remove user handles from the character restriction for @-replies, the startup gained popularity for a brief while in 2017. (back when Twitter changed its product so infrequently even mundane changes were fodder for mass outrage). Mastodon had another surge in popularity in 2019, after users in India were enraged by moderation practises.
|
||||
|
||||
Mastodon had previously been mentioned as a possible Twitter alternative, although it has yet to gain traction in the public. However, its current popularity coincides with Twitter’s exploration of how it could become an open-source protocol, similar to Mastodon.
|
||||
|
||||
Mastodon, unlike Twitter, is not a single, centralised service. Though the interface resembles Twitter (it has a 500-character restriction but is otherwise very similar to Twitter), it is based on an open-source protocol. Users can form and maintain their own “instances,” each with its own set of rules for membership, moderation, and other critical policies. Users can also take their followers with them from one instance to the next.
|
||||
|
||||
Mastodon has its own instances, mastodon.social and mastodon.online, although Rochko claims that these are overburdened and recommends that new users sign up using the official applications and join other Mastodon communities. Mastodon also makes its code available on GitHub because it’s open source, something Musk has praised when it comes to Twitter’s algorithms.
|
||||
|
||||
All of this adds to the difficulty for new users who may not be familiar with Mastodon’s structure or how it functions. Those who stay long enough may notice some important new features. End-to-end encrypted communications is in the works, as is “very amazing groups functionality,” according to Rochko.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.opensourceforu.com/2022/04/following-musks-acquisition-of-twitter-an-open-source-alternative-is-exploding/
|
||||
|
||||
作者:[Laveesh Kocher][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.opensourceforu.com/author/laveesh-kocher/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://www.opensourceforu.com/wp-content/uploads/2022/04/220405-ROB-Elon-Musk-Twitter-jg-af752e-696x348.jpg
|
||||
[2]: https://joinmastodon.org/communities
|
@ -1,87 +0,0 @@
|
||||
[#]: subject: "Trinity Desktop Environment (TDE) Latest Release Brings PolicyKit Support and Updates"
|
||||
[#]: via: "https://www.debugpoint.com/2022/05/tde-release-r14-0-12/"
|
||||
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Trinity Desktop Environment (TDE) Latest Release Brings PolicyKit Support and Updates
|
||||
======
|
||||
Trinity Desktop Environment (TDE) brings the latest application updates, bug fixes, and enhancements to its release Trinity R14.0.12.
|
||||
|
||||
Trinity Desktop Environment is a Fork of KDE version 3.5 and a continuation of feature updates and bug fixes by a small development team. This independent and standalone desktop project is still alive today for those who believe how excellent the KDE 3 desktop methodology is.
|
||||
|
||||
Trinity Desktop Environment release R14.0.12 brings new applications, enhancements and significant bug fixes.
|
||||
|
||||
[TDE release R14.0.12][1] is the 12th maintenance release of the R14.0 series built upon its previous iteration released in Oct 2021. This release brings new applications, 10+ enhancements, bug fixes and support for the latest [Ubuntu 22.04 Jammy Jellyfish][2] and other distributions.
|
||||
|
||||
![Trinity Desktop Environment – TDE release R14.0.12][3]
|
||||
|
||||
### Trinity Desktop Environment – TDE release R14.0.12
|
||||
|
||||
Firstly, TDE R14.0.12 introduces Polkit-agent-tde and Polkit-tqt, which helps with the PolicyKit authentication triggered by the TQt interfaces. That means, when required, the admin password prompt is now invoked via PolicyKit for authentication. Also, a new embeddable lightweight markdown document viewer is introduced in this release.
|
||||
|
||||
Secondly, the list of enhancements includes the Konsole applications improvements, support for complex characters and HTML5 in Quanta (web dev editor), and support for Let’s Encrypt certificates. Not only that, TDE’s overall look is improved in addition to translation updates, and support for Python3 are some of the exciting enhancements in this release.
|
||||
|
||||
Moreover, on the building aspect, several packages migrated to the CMake build system while automake build system dropped for others.
|
||||
|
||||
Other than that, the application bug fixes include, Kaffeine seeing a fix on the libdvdcss codec detection in its player module, Amarok fixing errors for the latest Ruby programming language, and KMail correcting the email redirection to the default account.
|
||||
|
||||
Among all, other notable core bug fixes include a timeout fix in dbus service startup and a system hang fix during the shutdown.
|
||||
|
||||
Furthermore, following the other Linux distribution’s latest releases, TDE R14.0.12 introduces Ubuntu 22.04 LTS Jammy Jellyfish support, dropped support for Debian Jessie and improvements for Gentoo.
|
||||
|
||||
All of these changes with some additional updates for developers who build applications for this KDE 3.5 tech can be found in the official changelog of TDE R14.0.12 on this [page][4].
|
||||
|
||||
Finally, you should be happy to know that Good ol’ Trinity Desktop Environment is available for all mainstream Linux Distribution for installation, including Ubuntu, Fedora, Arch Linux, etc. A list of installation instructions is available [here][5].
|
||||
|
||||
#### Installing TDE in Ubuntu 22.04 LTS
|
||||
|
||||
Open a terminal and run the following commands in sequence to install this desktop environment. Also, make sure to log off after completion and choose TDE from the login. While installing, the installer would prompt you to choose the display manager. Choose the option gdm (GNOME Display Manager).
|
||||
|
||||
```
|
||||
sudo gedit /etc/apt/sources.list
|
||||
```
|
||||
|
||||
Add the following line and save the file.
|
||||
|
||||
```
|
||||
deb http://mirror.ppa.trinitydesktop.org/trinity/deb/trinity-sb jammy deps-r14 main-r14deb-src http://mirror.ppa.trinitydesktop.org/trinity/deb/trinity-sb jammy deps-r14 main-r14
|
||||
```
|
||||
|
||||
```
|
||||
wget http://mirror.ppa.trinitydesktop.org/trinity/deb/trinity-keyring.debsudo dpkg -i trinity-keyring.debsudo apt updatesudo apt install kubuntu-default-settings-trinity kubuntu-desktop-trinity
|
||||
```
|
||||
|
||||
### Video walkthrough of this release
|
||||
|
||||
Here’s a quick video we prepared for you of this release. Don’t forget to subscribe to us!
|
||||
|
||||
![Trinity Desktop Environment TDE R14 0 12 Walkthrough Video][6]
|
||||
|
||||
As always, make sure to check out the official [contribution][7] page to help the dev team with your expertise and capacity.
|
||||
|
||||
*Via Release announcement*
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.debugpoint.com/2022/05/tde-release-r14-0-12/
|
||||
|
||||
作者:[Arindam][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.debugpoint.com/author/admin1/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://wiki.trinitydesktop.org/Release_Notes_For_R14.0.12
|
||||
[2]: https://www.debugpoint.com/2022/04/ubuntu-studio-22-04-lts/
|
||||
[3]: https://www.debugpoint.com/wp-content/uploads/2022/05/Trinity-Desktop-Environment-TDE-release-R14.0.12.jpg
|
||||
[4]: https://wiki.trinitydesktop.org/Release_Notes_For_R14.0.12
|
||||
[5]: https://wiki.trinitydesktop.org/Category:Installation
|
||||
[6]: https://youtu.be/qoGylRyAJEo
|
||||
[7]: https://www.trinitydesktop.org/helpwanted.php
|
@ -1,115 +0,0 @@
|
||||
[#]: subject: "Tails 5 Review: A Perfect Privacy-Focused Linux"
|
||||
[#]: via: "https://www.debugpoint.com/2022/05/tails-5-review/"
|
||||
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Tails 5 Review: A Perfect Privacy-Focused Linux
|
||||
======
|
||||
Here’s a quick review of Debian-based Tails 5, released a while back, refreshing its core modules with Debian 11 Bullseye.
|
||||
|
||||
Before we jump into the review of Tails 5, it’s worth mentioning what Tails are about. Tails, aka The Amnesic Incognito Live System, is a [privacy-focussed Linux Distribution][1] which uses the Tor network to protect you while browsing the web. Tails are based on Debian stable branch and come with many goodies such as an IRC client, Tor browser, email clients, and messengers to help you roam around on the web anonymously.
|
||||
|
||||
![Tails 5 Desktop Running GNOME 3.38][2]
|
||||
|
||||
### Tails 5 Review
|
||||
|
||||
#### ISO, Installation
|
||||
|
||||
Tails are available as a complete installation ISO image with an additional image capable of running from the USB drive itself. If you plan to use Tails, you should first think about your primary purpose for using Tails. And choose the ISO you want.
|
||||
|
||||
I would recommend that everyone be ready with a Tails USB stick. It’s handy on many occasions. For example, if you want to be anonymous for a short time and travel with public Wi-Fi, you might want to create a bootable Thumb drive to carry.
|
||||
|
||||
Both images are around 1.2GB in size and are available for download from the official website.
|
||||
|
||||
Installation of Tails is a little different, and you can find the guide [here][3].
|
||||
|
||||
#### First Impression
|
||||
|
||||
The first-time boot of Tails asks you to confirm the keyboard layout and language and followed by connecting to the Tor network. If you are not familiar with the Tor network, it gives two easy options. The Easier option is recommended for all users as it takes care of connecting to the Tor network with bridge setup, etc. You can also choose the “safer” option if you know what the options mean.
|
||||
|
||||
Once you complete the setup, you get a nice and clean GNOME Desktop environment which comes as default with Tails with additional applications. The GNOME version for Tails 5 is GNOME 3.38.6 stable which is the pre-GNOME 40 desktop with the traditional application menu with a vertical dock and workspaces.
|
||||
|
||||
You don’t need anything fancy desktop while using Tails for some critical work. GNOME 3.38x does just fine and it’s fast.
|
||||
|
||||
![Tails Welcome Screen][4]
|
||||
|
||||
![Tails 5 – Initial Tor Setup][5]
|
||||
|
||||
#### Tor Network and Application Updates
|
||||
|
||||
At its core, Tails 5 is based on [Debian 11 Bullseye][6](which is the current stable version) and [Linux Kernel 5.10][7].
|
||||
|
||||
The application list of Tails is mostly curated for privacy oriented work. The Tails application list includes the Tor Browser, Tor Connection Manager, and Onion Circuits Manager. During my test, the Tor network connected properly without any problem.
|
||||
|
||||
In addition to that, this release introduces Kleopatra (replaces Seahorse) which is a Certification manager to GnuPG and helps to manage OpenPGP certificates and keys.
|
||||
|
||||
One of the essential features of Tails is the persistance storage configuration which is required if you use Tails via a USB stick. Tails 5 imprves the Persistance Storage option to make it more faster and rubust in nature.
|
||||
|
||||
Furthermore, the application stack in Tails 5.0 refreshed with their respective stable version according to Debian Bullseye listed below.
|
||||
|
||||
* Tor Browser 11.0.11
|
||||
* GNOME 3.38.6
|
||||
* MAT 0.12
|
||||
* Audacity 2.4.2
|
||||
* GNOME Disks 3.38
|
||||
* GIMP 2.10.22
|
||||
* Inkscape 1.0
|
||||
* LibreOffice 7.0
|
||||
|
||||
Tails packages all necessary applications to help with your purpose of anonymity, and those are acihved by its specific applications as listed here.
|
||||
|
||||
* Password manager – KeePassXC
|
||||
* Pidgin Internet messenger
|
||||
* Thunderbird Email Client
|
||||
* Tor Browser and Connection Manager
|
||||
* Onion Circuit manager
|
||||
* Application for configuring Persistance Storage
|
||||
* GtkHash checks for files
|
||||
* Root Terminal
|
||||
|
||||
A tool called Additional Software that Tails includes; it helps run the different applications from the local media instead of downloading them after each boot.
|
||||
|
||||
#### Performance
|
||||
|
||||
The performance of Tails is stable and depends on GNOME Desktop. During my test, it behaved well, no major surprises of problems. Overall desktop feel is faster considering it is still GNOME 3.38 version.
|
||||
|
||||
So, during the performance test at idle, it was consuming around 4% CPU on average and memory is at 1.6 GB. It may be a little higher for an idle state, but being a privacy-focused distro, background processes, and daemon running contributed to this metric.
|
||||
|
||||
Also, the network histroy shows a continuous packaet traction at an idle state which I believe is due to some daemon running continuously.
|
||||
|
||||
![Tails 5 Performance shows continuous network ping][8]
|
||||
|
||||
### Closing Notes
|
||||
|
||||
Privacy is more important than ever today. And Tails is the best Linux distro for privacy-focused people out there. With the solid Debian stable base, GNOME desktop and [robust documentation,][9] Tails is a “go-to” distro for security researchers and advanced users. Moreover, the Tails team did an excellent job with its nicely crafted documentation which takes care of most of the problems you may face while using it. With that said, if you want to try out Tails 5, visit [this page for download][10] and read the installation [guide][11].
|
||||
|
||||
A word of caution: While using Tails, try not to visit banks or financial websites or make any transactions requiring 2FA authentication.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.debugpoint.com/2022/05/tails-5-review/
|
||||
|
||||
作者:[Arindam][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.debugpoint.com/author/admin1/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://www.debugpoint.com/2022/04/privacy-linux-distributions-2022/
|
||||
[2]: https://www.debugpoint.com/wp-content/uploads/2022/05/Tails-5-Desktop-Running-GNOME-3.38.jpg
|
||||
[3]: https://tails.boum.org/install/linux/index.en.html
|
||||
[4]: https://www.debugpoint.com/wp-content/uploads/2022/05/Tails-Welcome-Screen.jpg
|
||||
[5]: https://www.debugpoint.com/wp-content/uploads/2022/05/Tails-5-Initial-Tor-Setup.jpg
|
||||
[6]: https://www.debugpoint.com/2021/05/debian-11-features/
|
||||
[7]: https://www.debugpoint.com/2020/12/linux-kernel-5-10-release-announcement/
|
||||
[8]: https://www.debugpoint.com/wp-content/uploads/2022/05/Tails-5-Performance-shows-continuous-network-ping.jpg
|
||||
[9]: https://tails.boum.org/doc/index.en.html
|
||||
[10]: https://tails.boum.org/install/index.en.html
|
||||
[11]: https://tails.boum.org/install/linux/index.en.html
|
@ -1,127 +0,0 @@
|
||||
[#]: subject: "KDE Plasma 5.25: Top New Features and Release Details"
|
||||
[#]: via: "https://www.debugpoint.com/2022/05/kde-plasma-5-25"
|
||||
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
KDE Plasma 5.25: Top New Features and Release Details
|
||||
======
|
||||
We will give you the feature summary of the KDE Plasma 5.25 desktop environment (upcoming).
|
||||
|
||||
KDE Plasma 5.25 is the 27th version of KDE Plasma desktop, not an LTS release. This release is followed by the prior [5.24 LTS][1], released in February. KDE Plasma 5.25 brings several exciting updates on the desktop UI, polished applets, widgets, a good set of gesture updates for touch-based devices and a massive list of bug fixes. Plasma 5.25 is based on Qt 5.15.2 and KDE Frameworks 5.94.
|
||||
|
||||
KDE Plasma releases on June 14, 2022, but before that following milestones are to be met:
|
||||
|
||||
* Soft feature freeze: May 5, 2022 (Completed)
|
||||
* Beta: May 19, 2022
|
||||
* Final release: June 14, 2022
|
||||
|
||||
The list of bug fixes and features is around 400+, and it’s challenging to cover them in a single article. We filtered out in this article some of the essential and visual changes which are more impactful straightaway to the general user base.
|
||||
|
||||
### KDE Plasma 5.25 – Top New Features
|
||||
|
||||
#### Plasma Workspace & Desktop
|
||||
|
||||
Perhaps the most important visual change in KDE Plasma 5.25 is accent colour change based on the Wallpaper. As reported earlier, this change gives the final touch to the entire accent colour functionality and makes it complete with dynamic colour, custom colour and pre-sets. The option is available in the Appearance module. ([MR#1325)][2]
|
||||
|
||||
![KDE Plasma 5.25 – Accent Colour Change Based on the wallpaper][3]
|
||||
|
||||
In addition, the accent colour change to the title bar was [also implemented][4] in the Breeze Classic theme and made it more consistent across the desktop.
|
||||
|
||||
Another exciting change that KDE Plasma 5.25 brings is an option for Themes to make the Panel float. When selected, the Panel detaches itself from the bottom of the screen with rounded corners and gives a floating feeling. The option is available in the additional settings in Edit Panel mode. Here’s how it looks. ([MR#714)][5]
|
||||
|
||||
In addition to that, the power profiles menu in the system tray now has [icons][6] with their names in the [tooltip][7].
|
||||
|
||||
The login and logout screen see a [small UI change][8] to display avatar and profile name with longer user names.
|
||||
|
||||
Also, the spacing between the avatar icon and name with the logout screen action buttons is [increased][9] to give a more consistent look.
|
||||
|
||||
A fix was made to the Plasma Desktop to prevent widgets from [retaining position][10]when resolution changes back from fullscreen gaming. The widgets remember their position for respective resolutions.
|
||||
|
||||
The plasma Workspace module [reverts][11]to the lock screen behaviour on mouse move, which was removed accidentally earlier.
|
||||
|
||||
The Digital Clock “Copy to Clipboard” menu is now [more clean][12] with the removal of duplicate items and separate entries when seconds are enabled.
|
||||
|
||||
#### KWin Updates
|
||||
|
||||
KWin introduces an [option to hide][13] minimised windows in KDE Plasma 5.25. In addition to that, the desktop grid effect is [completely replaced][14] with the QML Version.
|
||||
|
||||
Furthermore, it is now possible to switch between display specific resolutions which are not visible to the operating system in Wayland. The change adds [libxcvt][15] dependency in Kwin, and details of this change can be found [here][16].
|
||||
|
||||
With this release, the switching between the dark and light mode is more smooth and animated thanks to this [MR][17], inspired by GNOME. It was not smooth earlier and now looks more professional behaviour.
|
||||
|
||||
#### Changes in Discover
|
||||
|
||||
The application page of Discover is now complete with [more focused details][18] at the top with Application metadata and images. The spacing of the app name, ratings and developer with the image at the header section with the summary in the middle. And rest at the bottom. Here’s a side by side comparison of the earlier version with 5.25.
|
||||
|
||||
One tiny yet impactful change in Discover related to Flatpak apps. Discover now [shows][19] a message with an action button to clean Flatpak data for uninstalled apps.
|
||||
|
||||
Moreover, Discover now [shows the required permissions][20]of the Flatpak applications before you install them. In addition, if you are planning to install proprietary software, you get a warning message saying the potential consequences of using those (such as Microsoft Teams).
|
||||
|
||||
#### Application and Applet Changes
|
||||
|
||||
The System Monitor (KSystemStats) shows new [information about your window system][21] whether you are running X11 or Wayland. This should also display on the overview screen of the KSysGuard.
|
||||
|
||||
The Open With Dialog of XGD Portal sees a [complete UI rework][22]. The top section label is merged into one single information line for better clarity. Also, the search field is now visible for all modes, and the Show More button is moved up beside Search with better clarity. You can look at the below image (Credit KDE Team) for this change.
|
||||
|
||||
The Plasma Applet for NetworkManager now [shows][23] the WiFi frequency connection nection details to help distinguish which frequency you are connected to in the same SSID (same Wi-Fi Router). It’s really helpful if both the band have the same Wifi Accent point name and you cannot distinguish between 4G or 5G.
|
||||
|
||||
The cuttlefish icon viewer now helps you [open the file path via the file manager][24] directly of the selected icon.
|
||||
|
||||
Plasma desktop now gives a [more organised view][25]in “Recent Documents” with the ability to show “non-file” items such as RDP or remote connections.
|
||||
|
||||
Moreover, the spell checker module in KRunner now [detects][26] the search language and gives you results.
|
||||
|
||||
When you run into an error, the KInfocenter now gives you [more information][27] about the error. The new design gives you what is the error, why it happened, whether you can fix it by yourself and how to report it to the devs. This is a nifty change that has a more significant impact. Here’s a side by side view of the change.
|
||||
|
||||
### Closing Notes
|
||||
|
||||
Along with the above changes, this release improves several gestures for touch devices and a massive list of performance and bug fixes (counting 150+), which will enhance the KDE Plasma 5.25 experience for all of its users.
|
||||
|
||||
If you want to give a hand on testing, read the [contribution guide][28], and you can try the [unstable edition of KDE Neon][29] until the BETA release.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.debugpoint.com/2022/05/kde-plasma-5-25
|
||||
|
||||
作者:[Arindam][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.debugpoint.com/author/admin1/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://www.debugpoint.com/2022/03/kde-plasma-5-24-review/
|
||||
[2]: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1325
|
||||
[3]: https://www.debugpoint.com/wp-content/uploads/2022/05/KDE-Plasma-5.25-Accent-Colour-Change-Based-on-wallpaper-1024x611.jpg
|
||||
[4]: https://invent.kde.org/plasma/breeze/-/merge_requests/182
|
||||
[5]: https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/714
|
||||
[6]: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1585
|
||||
[7]: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1668
|
||||
[8]: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1654
|
||||
[9]: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1647
|
||||
[10]: https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/608
|
||||
[11]: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1707
|
||||
[12]: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1693
|
||||
[13]: https://invent.kde.org/plasma/kwin/-/merge_requests/2341
|
||||
[14]: https://invent.kde.org/plasma/kwin/-/merge_requests/2327
|
||||
[15]: https://gitlab.freedesktop.org/xorg/lib/libxcvt
|
||||
[16]: https://bugs.kde.org/448398
|
||||
[17]: https://invent.kde.org/plasma/kwin/-/merge_requests/2088
|
||||
[18]: https://invent.kde.org/plasma/discover/-/merge_requests/246
|
||||
[19]: https://invent.kde.org/plasma/discover/-/merge_requests/297
|
||||
[20]: https://invent.kde.org/plasma/discover/-/merge_requests/282
|
||||
[21]: https://invent.kde.org/plasma/ksystemstats/-/merge_requests/34
|
||||
[22]: https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/merge_requests/94
|
||||
[23]: https://invent.kde.org/plasma/plasma-nm/-/merge_requests/112
|
||||
[24]: https://invent.kde.org/plasma/plasma-sdk/-/merge_requests/32
|
||||
[25]: https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/551
|
||||
[26]: https://invent.kde.org/plasma/kdeplasma-addons/-/merge_requests/122
|
||||
[27]: https://invent.kde.org/plasma/kinfocenter/-/merge_requests/90
|
||||
[28]: https://community.kde.org/Get_Involved
|
||||
[29]: https://neon.kde.org/download
|
@ -1,118 +0,0 @@
|
||||
[#]: subject: "10 Best Features of Fedora 36 That Makes it a Powerful Release"
|
||||
[#]: via: "https://www.debugpoint.com/2022/05/fedora-36-features/"
|
||||
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
10 Best Features of Fedora 36 That Makes it a Powerful Release
|
||||
======
|
||||
If you are excited about the Fedora 36 release, here’s a quick summary of the 10 best Fedora 36 features that you should check out before trying.
|
||||
|
||||
![Fedora 36 Workstation Desktop][1]
|
||||
|
||||
Fedora 36 releases on May 10, 2022, and it brings a list of special features across the desktop, flavours, internal structures and more. Before installing or upgrading it, you should know about the unique features. Here they are.
|
||||
|
||||
### Best Fedora 36 Features
|
||||
|
||||
#### 1. GNOME 42 as Default Workstation Desktop
|
||||
|
||||
The most important feature of Fedora 36 is the brand new GNOME 42, which comes as default with the Fedora Workstation edition. With the Fedora Workstation edition, you get the original GNOME 42 version without any customisation, unlike Ubuntu. Hence to experience the vanilla GNOME 42, Fedora 36 is the perfect choice for you.
|
||||
|
||||
Firstly, GNOME 42 brings the modern GTK4 and libadwaita based Shell and native applications. Most native GNOME apps are already ported to GTK4, giving a revamped look with friendly UI components. You should notice the difference in every nook and corner of the desktop.
|
||||
|
||||
Not only that, this version of GNOME introduces the Dark and Light Style in the Appearance section. The native applications also adapt to the light and dark styles automatically. Moreover, the wallpaper can also change based on the style, and you can create [dark and light versions of the wallpaper][2].
|
||||
|
||||
Furthermore, GNOME 42 brings a [new text editor][3], a new screenshot and screencast tool and well designed on-screen display. You may want to read the [features of GNOME 42 here in detail][4].
|
||||
|
||||
#### 2. Linux Kernel 5.17
|
||||
|
||||
In addition to that, Fedora 36 also brings the latest mainline Linux Kernel 5.17, which has support for all the modern GPU, CPU and other improvements. The updates in this Kernel include temperature support for the AMD Zen family of devices, a long-standing Floppy Disk hangs bug, a handful of ARM/SoC support and performance improvements across all subsystems.
|
||||
|
||||
You can read our [detailed Linux Kernel 5.17][5] coverage to learn more.
|
||||
|
||||
#### 3. Wayland by Default for NVIDIA Proprietary Drivers
|
||||
|
||||
Perhaps the most impactful change in this release is the decision from Fedora to make [Wayland as default][6] session with NVIDIA proprietary driver. If you remember, Wayland was the default server since Fedora 22, but it has not defaulted when the NVIDIA proprietary driver is in use. And it changes now. So, while updating or installing an NVIDIA system, check the session type before login.
|
||||
|
||||
#### 4. Systemd Messages Updates
|
||||
|
||||
Other than the above changes, the systemd messages become more friendly with a small but impactful change on how the messages are logged in this release. In Fedora 36, the systemd messages show the unit name with the usual name. For example, if it shows “Network Manager”, it would now show “NetworkManager.service” and the name. This will help debug some problems in a system requiring scrolling through thousands of messages.
|
||||
|
||||
![More detailed journalctl messages in Fedora 36][7]
|
||||
|
||||
#### 5. System Font Changes
|
||||
|
||||
On top of the above changes, the default font type is changing to Noto Font from DejaVu fonts. This will provide a better experience and consistent text rendering across the desktop. So, google-noto-sans* packages will be installed by default to replace dejavu*.
|
||||
|
||||
#### 6. Updated Spins
|
||||
|
||||
That’s not all the changes, the official Fedora flavours or Spins are also refreshed with their stable versions. Not all desktop environments get major releases in a year, but you always get the latest bugfix versions with Fedora.
|
||||
|
||||
Here’s a quick recap of the version of the official Fedora Spins in this release.
|
||||
|
||||
* Fedora KDE with KDE Plasma 5.24
|
||||
* Fedora with Xfce 4.16
|
||||
* Fedora with LXQt 1.1
|
||||
* Fedora MATE-Compiz with MATE 1.24
|
||||
|
||||
#### 7. Tool Chain Updates
|
||||
|
||||
Many Fedora users are the developers who use it for their personal or professional work. For programmers or developers, the toolchain is important. Because Fedora features the latest compilers, databases and other dependent packages. Here’s a quick list of packages and applications:
|
||||
|
||||
* PHP 8.1
|
||||
* Ruby on Rails 7.0
|
||||
* OpenJDK 17
|
||||
* Django 4.0
|
||||
* gcc 12
|
||||
* glibc 2.35
|
||||
* Golang 1.18
|
||||
* OpenSSL 3.0
|
||||
* Ruby 3.1
|
||||
* Ansible 5
|
||||
* Firefox 100
|
||||
* LibreOffice 7.3
|
||||
|
||||
#### 8. Single User as Admin
|
||||
|
||||
The majority of the Fedora workstation installations are single-user types than the shared or enterprise users. Hence, Fedora 36 makes the single user as administrator by default during installation with this release. The Anaconda installer sets the admin option by default.
|
||||
|
||||
#### 9. RPM Structure
|
||||
|
||||
The internal RPM package database in the Fedora system is located under `/var` today. With this release, it is [moving][8] to `/usr` directory. The primary reason is consistency with other RPM-based distributions such as openSUSE and Fedora rpm-ostree based systems (Kinoite, Silverblue, etc.)
|
||||
|
||||
#### 10. NetworkManager Configuration
|
||||
|
||||
Finally, this release removes the NetworkManager legacy configuration file support (ifcfg files). This is a classic case of Fedora being a pioneer in adopting new methods, deprecating the older way of doing things. The NetworkManager evolved over the years and now uses more streamlined configuration files called keyfiles. Hence, it is no longer necessary to support the older ifcfg files for compatibility reasons. For more details about this change, visit this [excellent article][9] from Fedora Magazine.
|
||||
|
||||
### Closing Notes
|
||||
|
||||
In addition to the above changes, this release brings many more under the hood performance tweaks and bug fixes which you can read [here][10].
|
||||
|
||||
Fedora 36 releases on May 10, 2022.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.debugpoint.com/2022/05/fedora-36-features/
|
||||
|
||||
作者:[Arindam][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.debugpoint.com/author/admin1/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://www.debugpoint.com/wp-content/uploads/2022/05/Fedora-36-Workstation-Desktop.jpg
|
||||
[2]: https://www.debugpoint.com/2022/04/custom-light-dark-wallpaper-gnome/
|
||||
[3]: https://www.debugpoint.com/2021/12/gnome-text-editor/
|
||||
[4]: https://www.debugpoint.com/2022/03/gnome-42-release/
|
||||
[5]: https://www.debugpoint.com/2022/03/linux-kernel-5-17/
|
||||
[6]: https://www.debugpoint.com/wp-admin/.org/wiki/Changes/WaylandByDefaultOnNVIDIA
|
||||
[7]: https://www.debugpoint.com/wp-content/uploads/2022/05/More-detailed-journalctl-messages-in-Fedora-36.jpg
|
||||
[8]: https://fedoraproject.org/wiki/Changes/RelocateRPMToUsr
|
||||
[9]: https://fedoramagazine.org/converting-networkmanager-from-ifcfg-to-keyfiles/
|
||||
[10]: https://fedoraproject.org/wiki/Releases/36/ChangeSet
|
@ -1,207 +0,0 @@
|
||||
[#]: subject: "Fedora 35 v Fedora 36: What’s the Difference?"
|
||||
[#]: via: "https://news.itsfoss.com/fedora-35-v-fedora-36/"
|
||||
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Fedora 35 v Fedora 36: What’s the Difference?
|
||||
======
|
||||
Fedora 36 is here. It’s a significant upgrade. So, what’s different from Fedora 35? Should you upgrade now? Let’s take a look.
|
||||
|
||||
![fedora comparison][1]
|
||||
|
||||
Fedora 36 is an impressive release with a [list of interesting feature upgrades][2].
|
||||
|
||||
While Fedora 35 included GNOME 41 and [debuted with a new KDE variant][3] (Fedora Kinoite) and several other technical changes, Fedora 36 is another interesting upgrade.
|
||||
|
||||
Fedora 36 packs in GNOME 42 with new feature additions, and some usual technical improvements.
|
||||
|
||||
What’s different between the two releases?
|
||||
|
||||
Here, we shall be focusing on the key changes considering the desktop user experience along with some technical differences.
|
||||
|
||||
#### 1. Support Lifespan
|
||||
|
||||
If you are reading this when we published this article, you still have the time to continue using Fedora 35 or upgrade to Fedora 36.
|
||||
|
||||
Fedora 35 will be supported until **November 2022**. Typically, every Fedora release gets support for 13 months.
|
||||
|
||||
So, you can expect Fedora 36 to be maintained until **June 2023**.
|
||||
|
||||
#### 2. Desktop Environment Choices
|
||||
|
||||
The primary offering for Fedora 35 features GNOME 41, and Fedora 36 comes with GNOME 42.
|
||||
|
||||
In addition to its GNOME editions, you can also find KDE and LXQt versions as other popular variants.
|
||||
|
||||
With Fedora 35, you get the option to use KDE Plasma 5.22 or LXQt 0.17.
|
||||
|
||||
And, with Fedora 36, you can find KDE Plasma 5.24 and LXQt 1.0 as your options.
|
||||
|
||||
#### 3. Wayland by Default for Nvidia
|
||||
|
||||
With Fedora 35, you already had Wayland by default for desktop sessions (initially introduced with Fedora 34), excluding proprietary Nvidia drivers.
|
||||
|
||||
Now, with Fedora 36, if you use a proprietary Nvidia driver, the GDM sessions will use Wayland by default.
|
||||
|
||||
#### 4. Wallpapers
|
||||
|
||||
Fedora always features some kind of artistic/creative wallpaper. You can see the default wallpaper difference in action here:
|
||||
|
||||
![][4]
|
||||
|
||||
![][5]
|
||||
|
||||
In addition to the default, Fedora 36 also comes with a newer collection of wallpapers.
|
||||
|
||||
Fedora 36 also includes dark/light variants of the wallpapers to blend in with the new dark mode theme preference.
|
||||
|
||||
![][6]
|
||||
|
||||
![][7]
|
||||
|
||||
#### 5. Appearance Menu & Dark Theme
|
||||
|
||||
Thanks to GNOME 42, Fedora 36 now features a new Appearance option in the system settings that lets you switch to a system-wide dark/light theme.
|
||||
|
||||
![Fedora 36 (Appearance menu)][8]
|
||||
|
||||
With Fedora 35, you did not have any options to enable a dark theme, which was a bummer at the time.
|
||||
|
||||
And, as mentioned previously, with the theme preferences, the background also changes automatically.
|
||||
|
||||
#### 6. Settings Menu
|
||||
|
||||
![][9]
|
||||
|
||||
![][10]
|
||||
|
||||
Fedora 36 received an upgrade to the settings menu with new options, dark mode support, and subtle changes to the look with an enhanced GNOME experience.
|
||||
|
||||
#### 7. Login and Lockscreen
|
||||
|
||||
You will also notice differences in the login screen with a darker default avatar ditching the red icon, making them look cleaner.
|
||||
|
||||
![][11]
|
||||
|
||||
![][12]
|
||||
|
||||
While I mention the details for the font changes later in the article, the lock screen lets you notice that significantly with the change in font size for the clock/time in the lock screen.
|
||||
|
||||
Of course, the blur effect for the background remains in both.
|
||||
|
||||
![][13]
|
||||
|
||||
![][14]
|
||||
|
||||
#### 7. Linux Kernel
|
||||
|
||||
Fedora releases always include the latest and greatest Linux Kernel available. So, if you’re using the up-to-date version of Fedora 35/46, you will be getting the same Linux Kernel.
|
||||
|
||||
With Fedora 36, you get [Linux Kernel 5.17][15] out of the box which comes with a range of next-gen hardware support and improvements.
|
||||
|
||||
And, Fedora 35 featured Linux Kernel 5.14, but now you can find Linux Kernel 5.17.
|
||||
|
||||
#### 8. Screenshot UI
|
||||
|
||||
Yet another exciting [feature upgrade in GNOME 42][16]. The screenshot user interface is entirely different in Fedora 36 with an added ability to record the screen.
|
||||
|
||||
![][17]
|
||||
|
||||
![][18]
|
||||
|
||||
In Fedora 35, you can take screenshots similarly using the GNOME Screenshot app, but it does not have an integrated screen recording feature.
|
||||
|
||||
In addition to this, on Fedora 36, you get the ability to take a screenshot when you perform a right-click on the title bar of a window.
|
||||
|
||||
![Fedora 36][19]
|
||||
|
||||
You don’t get to see this feature on Fedora 35.
|
||||
|
||||
#### 9. File Manager
|
||||
|
||||
File Manager isn’t functionally different. However, with the user interface overhaul, icon changes, and improvements, Fedora 36 features a snappier file manager overall.
|
||||
|
||||
![][20]
|
||||
|
||||
![][21]
|
||||
|
||||
I never liked the icon theme on Fedora 35. So, that’s a pretty good upgrade for users like me.
|
||||
|
||||
Of course, you can always look for [GTK icon themes][22] to personalize the experience.
|
||||
|
||||
#### 10. Software Center
|
||||
|
||||
![Software Center on Fedora 36][23]
|
||||
|
||||
The software center has received improvements in Fedora 36 for its user experience and being more responsive to different screen resolutions.
|
||||
|
||||
You get all the essential details when comes to an app you select to view/install on Fedora, 35 and 36. Hence, the difference is limited to the overall UI and UX.
|
||||
|
||||
![Software Center on Fedora 35][24]
|
||||
|
||||
#### 11. Default Font Changes
|
||||
|
||||
Fedora 35 relies on multiple fonts for various languages. By default, it uses the DejaVu font, however, when you select a different language like Chinese, Japanese, Korean, etc, it has other defaults.
|
||||
|
||||
So, to make things consistent, Fedora 36 is making **Noto Fonts** the default, which supports various languages, and are generally higher quality fonts.
|
||||
|
||||
#### 12. Technical Changes
|
||||
|
||||
If you are looking to explore all the details, the official changelog would be better. However, to highlight a few important things, these are some of the noteworthy upgrades in Fedora 36:
|
||||
|
||||
* Golang 1.18
|
||||
* Ruby 3.1
|
||||
* GNOME Text Editor replacing Gedit
|
||||
* Subtle changes to the terminal application
|
||||
|
||||
### Wrapping Up
|
||||
|
||||
Unlike Ubuntu LTS releases (for instance, [20.04 vs 22.04][25]), when it comes to Fedora, you do have some time to upgrade, but you will have to eventually upgrade to keep getting updates/security fixes.
|
||||
|
||||
If you do not like the changes with newer Fedora releases, you may want to try Ubuntu or switch to an Arch Linux distro like [Manjaro][26].
|
||||
|
||||
*What do you think about the latest Fedora 36 release? Let us know your thoughts in the comments below.*
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://news.itsfoss.com/fedora-35-v-fedora-36/
|
||||
|
||||
作者:[Ankush Das][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://news.itsfoss.com/author/ankush/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://news.itsfoss.com/wp-content/uploads/2022/04/fedora-35-vs-fedora-36.jpg
|
||||
[2]: https://news.itsfoss.com/fedora-36-release-date-features/
|
||||
[3]: https://news.itsfoss.com/fedora-35-release/
|
||||
[4]: https://news.itsfoss.com/wp-content/uploads/2022/04/fedora-35-wallpaper.jpg
|
||||
[5]: https://news.itsfoss.com/wp-content/uploads/2022/04/fedora-36-wallpaper.jpg
|
||||
[6]: https://news.itsfoss.com/wp-content/uploads/2022/04/fedora-35-wallpaper-collection.jpg
|
||||
[7]: https://news.itsfoss.com/wp-content/uploads/2022/04/fedora-36-wallpaper-collection.jpg
|
||||
[8]: https://news.itsfoss.com/wp-content/uploads/2022/04/fedora-36-appearance.png
|
||||
[9]: https://news.itsfoss.com/wp-content/uploads/2022/04/fedora-35-settings.jpg
|
||||
[10]: https://news.itsfoss.com/wp-content/uploads/2022/04/fedora-36-settings.png
|
||||
[11]: https://news.itsfoss.com/wp-content/uploads/2022/04/fedora-35-login.jpg
|
||||
[12]: https://news.itsfoss.com/wp-content/uploads/2022/04/fedora-36-login.jpg
|
||||
[13]: https://news.itsfoss.com/wp-content/uploads/2022/04/fedora-35-lockscreen.jpg
|
||||
[14]: https://news.itsfoss.com/wp-content/uploads/2022/04/fedora-36-lockscreen.jpg
|
||||
[15]: https://news.itsfoss.com/linux-kernel-5-17-release/
|
||||
[16]: https://news.itsfoss.com/gnome-42-features/
|
||||
[17]: https://news.itsfoss.com/wp-content/uploads/2022/04/fedora-35-screenshot.jpg
|
||||
[18]: https://news.itsfoss.com/wp-content/uploads/2022/04/fedora-36-screenshot-ui.jpg
|
||||
[19]: https://news.itsfoss.com/wp-content/uploads/2022/04/fedora-36-take-screenshot.jpg
|
||||
[20]: https://news.itsfoss.com/wp-content/uploads/2022/04/fedora-35-file-manager.png
|
||||
[21]: https://news.itsfoss.com/wp-content/uploads/2022/04/fedora-36-file-manager.png
|
||||
[22]: https://itsfoss.com/best-gtk-themes/
|
||||
[23]: https://news.itsfoss.com/wp-content/uploads/2022/04/fedora-36-software-center.png
|
||||
[24]: https://news.itsfoss.com/wp-content/uploads/2022/04/fedora-35-software-center.png
|
||||
[25]: https://itsfoss.com/ubuntu-20-04-vs-22-04/
|
||||
[26]: https://news.itsfoss.com/manjaro-linux-experience/
|
@ -1,132 +0,0 @@
|
||||
[#]: subject: "How to Upgrade to Fedora 36 from Fedora 35 Workstation (GUI and CLI Method)"
|
||||
[#]: via: "https://www.debugpoint.com/2022/05/upgrade-fedora-36-from-fedora-35/"
|
||||
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
How to Upgrade to Fedora 36 from Fedora 35 Workstation (GUI and CLI Method)
|
||||
======
|
||||
Complete steps to upgrade to fedora 36 from fedora 35 workstation edition with gui and cli method.
|
||||
|
||||
Fedora 36 brings several important features such as the beautiful GNOME 42, Linux Kernel 5.17, default font changes and many stunning features. Moreover, Fedora 36 also brings Wayland display server as the default NVIDIA proprietary driver. Plus several other significant changes that Fedora 36 brings, which you can read here in our [top 10 feature coverage][1].
|
||||
|
||||
If you plan to upgrade to Fedora 36 from Fedora 35 workstation edition, here are the steps you need to perform.
|
||||
|
||||
![Fedora 36 Workstation Desktop][2]
|
||||
|
||||
### Upgrade to Fedora 36
|
||||
|
||||
There are two methods to upgrade to Fedora 36 workstation. The first is the command line method (CLI), and the second is the GUI method which is completely graphical. We will cover both ways in this guide.
|
||||
|
||||
However, before you get excited to upgrade, there is some housekeeping that you should do.
|
||||
|
||||
#### Steps to Follow before upgrading to Fedora 36
|
||||
|
||||
Firstly, Open GNOME Software and check for any pending updates. Or, open a terminal and run the following command to ensure that your system is up-to-date.
|
||||
|
||||
```
|
||||
sudo dnf update
|
||||
```
|
||||
|
||||
After the above command is complete, reboot your system to ensure all the updates are applied.
|
||||
|
||||
Secondly, take backups of your important documents such as pictures, docs or videos from your home directory to a safe place (perhaps a separate partition or USB stick). The Fedora upgrade process never fails, but if you use NVIDIA or any specific hardware with a dual boot system, I recommend you take backups.
|
||||
|
||||
Third, install the [Extensions Flatpak application][3] and disable all the GNOME Extensions (for the GNOME desktop). The primary reason is not all the extensions are ported yet to GNOME 42. Hence it is safe to disable all of them before upgrading. And you can enable them later after you complete the upgrade process.
|
||||
|
||||
Moreover, glance over the [Fedora 36 common bugs page][4] and the [forum][5] for any ongoing major bugs which may impact the upgrade process. Don’t spend much time on this.
|
||||
|
||||
Finally, the upgrade process takes some time (in hours), so ensure you have sufficient time and a stable internet connection.
|
||||
|
||||
#### How to Upgrade to Fedora 36 Workstation
|
||||
|
||||
##### Graphical Method (GUI)
|
||||
|
||||
After the official release of Fedora 36, you should see a prompt in GNOME Software showing that an upgrade is available. If you do not see any prompt, don’t worry. Wait for a day or two, and you should have it.
|
||||
|
||||
Also, you can visit the Updates tab in GNOME Software and see if it is available.
|
||||
|
||||
Click on the notification and hit Download to start the upgrade process. The upgrader will download the required packages and prompt you to restart. Hit restart to continue the upgrade process.
|
||||
|
||||
Fedora will apply the upgrades during reboot.
|
||||
|
||||
##### Command-Line method (CLI)
|
||||
|
||||
Firstly, you can follow the below steps, even if Fedora 36 is not yet released. And you can follow the same steps after the official release.
|
||||
|
||||
If you are comfortable with the command line, you can use the dnf upgrade command to perform the upgrade process.
|
||||
|
||||
Open up the terminal and run the below command:
|
||||
|
||||
```
|
||||
sudo dnf upgrade --refresh
|
||||
```
|
||||
|
||||
This command will refresh the packages for the new upgrade stream to get ready for Fedora 36.
|
||||
|
||||
Next, install the dnf upgrade plugin by running the below command. This is required for the upgrade process.
|
||||
|
||||
```
|
||||
sudo dnf install dnf-plugin-system-upgrade
|
||||
```
|
||||
|
||||
Make sure your system is up-to-date by running the below command and installing any necessary pending updates. Do it once again (if you have done it via pre-upgrade steps)
|
||||
|
||||
```
|
||||
sudo dnf --refresh upgrade
|
||||
```
|
||||
|
||||
Initiate the download process by running the below command. This command will fetch all required packages and save them locally before the upgrade.
|
||||
|
||||
```
|
||||
sudo dnf system-upgrade download --releasever=36
|
||||
```
|
||||
|
||||
If you installed many packages and applications manually and are unsure whether they are correctly supported by Fedora 36, run the above command with “–allowerasing” flag. When you provide this, dnf will remove the packages that are blockers for your system upgrade.
|
||||
|
||||
The above command displays what will be replaced, updated, upgraded, or downgraded. Carefully glance through the list if you want to review the list. Or, you can check the red-marked items and start the upgrade process—something like below.
|
||||
|
||||
![Fedora 36 upgrade via CLI][6]
|
||||
|
||||
![Review the RED marked items][7]
|
||||
|
||||
![Start the Fedora 36 Upgrade from CLI][8]
|
||||
|
||||
Remember, the download size ideally is in GB, so that it might take some time based on your internet speed.
|
||||
|
||||
After the above command is complete, run the below command to start the upgrade.
|
||||
|
||||
```
|
||||
sudo dnf system-upgrade reboot
|
||||
```
|
||||
|
||||
The system will reboot automatically and wait until the entire upgrade process completes. As I mentioned earlier, this might take time in terms of hours, depending on your system hardware. Hence be patient.
|
||||
|
||||
You will be greeted with a brand new Fedora 36 system if all goes well.
|
||||
|
||||
Good luck! 🤞
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.debugpoint.com/2022/05/upgrade-fedora-36-from-fedora-35/
|
||||
|
||||
作者:[Arindam][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.debugpoint.com/author/admin1/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.debugpoint.com/2021/04/fedora-34-features/
|
||||
[2]: https://www.debugpoint.com/wp-content/uploads/2022/05/Fedora-36-Workstation-Desktop2.jpg
|
||||
[3]: https://flathub.org/apps/details/org.gnome.Extensions
|
||||
[4]: https://fedoraproject.org/wiki/Common_F36_bugs
|
||||
[5]: https://ask.fedoraproject.org/tags/c/common-issues/141/none/f36/l/latest
|
||||
[6]: https://www.debugpoint.com/wp-content/uploads/2022/05/Fedora-36-upgrade-via-CLI.jpg
|
||||
[7]: https://www.debugpoint.com/wp-content/uploads/2022/05/Review-the-RED-marked-items.jpg
|
||||
[8]: https://www.debugpoint.com/wp-content/uploads/2022/05/Start-the-Fedora-36-Upgrade-from-CLI.jpg
|
@ -1,104 +0,0 @@
|
||||
[#]: subject: "What’s new in Fedora Workstation 36"
|
||||
[#]: via: "https://fedoramagazine.org/whats-new-fedora-36-workstation/"
|
||||
[#]: author: "Merlin Cooper https://fedoramagazine.org/author/mxanthropocene/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
What’s new in Fedora Workstation 36
|
||||
======
|
||||
|
||||
![][1]
|
||||
|
||||
The latest release of Fedora Workstation 36 continues the Fedora Project’s ongoing commitment to delivering the latest innovations in the open source world. This article describes some of the notable user-facing changes that appear in this version.
|
||||
|
||||
### GNOME 42
|
||||
|
||||
Fedora Workstation 36 includes the latest version of the GNOME desktop environment. GNOME 42 includes many improvements and new features. Just some of the improvements include:
|
||||
|
||||
* Significantly improved input handling, resulting in lower input latency and improved responsiveness when the system is under load. This is particularly beneficial for games and graphics applications.
|
||||
* The Wayland session is now the default for those who use Nvidia’s proprietary graphics driver.
|
||||
* A universal dark mode is now available.
|
||||
* A new interface has been added for taking screenshots and screen video recordings.
|
||||
|
||||
In addition, many of the core apps have been ported to GTK 4, and the shell features a number of subtle refinements.
|
||||
|
||||
#### Refreshed look and feel
|
||||
|
||||
![GNOME 42 as featured in Fedora Workstation 36][2]
|
||||
|
||||
GNOME Shell features a refreshed look and feel, with rounder and more clearly separated elements throughout. All the symbolic icons have been updated and the top bar is no longer rounded.
|
||||
|
||||
#### Universal dark mode option
|
||||
|
||||
In Settings > Appearance, you can now choose a dark mode option which applies a dark theme to all supported applications. In addition, the pre-installed wallpapers now include dark mode variants. Dark themes can help reduce eye-strain when there is low ambient light, can help conserve battery life on devices with OLED displays, and can reduce the risk of burn-in on OLED displays. Plus, it looks cool!
|
||||
|
||||
#### New screenshot interface
|
||||
|
||||
![Taking screenshots and screen video recordings is now easier than ever][3]
|
||||
|
||||
Previously, pressing the Print Screen key simply took a screenshot of the entire screen and saved it to the Pictures folder. If you wanted to customize your screenshots, you had to remember a keyboard shortcut, or manually open the Screenshots app and use that to take the screenshot you wanted. This was inconvenient.
|
||||
|
||||
Now, pressing Print Screen presents you with an all-new user interface that allows you to take a screenshot of either your entire screen, just one window, or a rectangular selection. You can also choose whether to hide or show the mouse pointer, and you can also now take a screen video recording from within the new interface.
|
||||
|
||||
#### Core applications
|
||||
|
||||
![Apps made in GTK 4 + libadwaita feature a distinct visual style][4]
|
||||
|
||||
GNOME’s core applications have seen a number of improvements. A number of them have been ported to GTK 4 and use libadwaita, a new widget library that implements GNOME’s Human Interface Guidelines.
|
||||
|
||||
* Files now includes the ability to sort files by creation date, and includes some visual refinements, such as a tweaked headerbar design and file renaming interface.
|
||||
* The Software app now includes a more informative update interface, and more prominently features GNOME Circle apps.
|
||||
* The Settings app now has a more visually appealing interface matching the visual tweaks present throughout GNOME Shell.
|
||||
* Text Editor replaces Gedit by default. Text Editor is an all-new app built in GTK 4 and libadwaita. You can always reinstall Gedit by searching for it in the Software app.
|
||||
|
||||
#### Wayland support on Nvidia’s proprietary graphics driver
|
||||
|
||||
In previous versions, Fedora Workstation defaulted to the X display server when using Nvidia’s proprietary graphics driver – now, Fedora Workstation 36 uses the Wayland session by default when using Nvidia’s proprietary graphics driver.
|
||||
|
||||
If you experience issues with the Wayland session, you can always switch back to the Xorg session by clicking the gear icon at the bottom-right corner of the login screen and choosing “GNOME on Xorg”.
|
||||
|
||||
### Under-the-hood changes throughout Fedora Linux 36
|
||||
|
||||
* When installing or upgrading packages with DNF or PackageKit, weak dependencies that have been manually removed will no longer be reinstalled. That is to say: if _foo_ is installed and it has _bar_ as a weak dependency, and _bar_ is then removed, _bar_ will not be reinstalled when _foo_ is updated.
|
||||
* The Noto fonts are now used by default for many languages. This provides greater coverage for different character sets. For users who write in the Malayalam script, the new Meera and RIT Rachana fonts are now the default.
|
||||
* systemd messages now include unit names by default rather than just the description, making troubleshooting easier.
|
||||
|
||||
![systemd messages shows unit names by default][5]
|
||||
|
||||
### Upgrade now!
|
||||
|
||||
You can upgrade your system through GNOME Software, via _[dnf system-upgrade][6]_ in the terminal, or [download the live ISO image][7] from the official website.
|
||||
|
||||
### Also check out…
|
||||
|
||||
There are always cool things happening in the Fedora Project!
|
||||
|
||||
* The social links in the upper right corner on Fedora Magazine now include our official [Fedora YouTube prescence][8], [Fedora Matrix homeserver][9], and the [Fedora Discussion][10] website!
|
||||
* Fedora Discussion has been lightly renovated! Come and chat with us! ☺️
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://fedoramagazine.org/whats-new-fedora-36-workstation/
|
||||
|
||||
作者:[Merlin Cooper][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://fedoramagazine.org/author/mxanthropocene/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://fedoramagazine.org/wp-content/uploads/2022/04/fedora36workstation-816x345.jpg
|
||||
[2]: https://fedoramagazine.org/wp-content/uploads/2022/03/fw36-1-1024x640.png
|
||||
[3]: https://fedoramagazine.org/wp-content/uploads/2022/03/scrui.png
|
||||
[4]: https://fedoramagazine.org/wp-content/uploads/2022/03/libadwaitat-1024x633.png
|
||||
[5]: https://fedoramagazine.org/wp-content/uploads/2022/03/systemdmsg.png
|
||||
[6]: https://docs.fedoraproject.org/en-US/quick-docs/dnf-system-upgrade/
|
||||
[7]: https://getfedora.org/en/workstation/download/
|
||||
[8]: https://www.youtube.com/channel/UCnIfca4LPFVn8-FjpPVc1ow
|
||||
[9]: https://chat.fedoraproject.org/#/welcome
|
||||
[10]: https://discussion.fedoraproject.org/
|
@ -1,214 +0,0 @@
|
||||
[#]: subject: "10 Things to Do After Installing Fedora 36 Workstation [With Bonus Tip]"
|
||||
[#]: via: "https://www.debugpoint.com/2022/05/10-things-to-do-fedora-36-after-install/"
|
||||
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
10 Things to Do After Installing Fedora 36 Workstation [With Bonus Tip]
|
||||
======
|
||||
I am sure you have already updated or installed Fedora 36 Workstation Edition. With that said, here’s our traditional article – “10 Things to Do After Installing Fedora 36”, to give you some post-install tweak ideas.
|
||||
|
||||
This guide is primarily for the Fedora 36 Workstation edition, i.e., GNOME Desktop. Because it is the default version and the most popular in terms of the user base. Hence, to make yourself more productive and tweak the entire desktop in the best possible way, here are the 10 things you can do after installing Fedora 36 Workstation Edition (GNOME).
|
||||
|
||||
### 10 Things to Do After Installing Fedora 36 Workstation
|
||||
|
||||
#### 1. Update DNF Configuration
|
||||
|
||||
Before you make any updates or changes in your system, it’s worth checking the dnf package manager configuration file for existing settings. The DNF is the default package manager (like apt) for Fedora Linux.
|
||||
|
||||
If you are a long time Fedora Linux user, you may know that dnf package downloads are sometimes slower despite having high-speed internet.
|
||||
|
||||
You can use the max_parallel_downloads option, among other tricks, in the /etc/dnf/dnf.conf file to make it faster.
|
||||
|
||||
This option takes a number (from 3 to 20) as its value which you specify in the file, and that many numbers of packages can be downloaded parallelly using dnf.
|
||||
|
||||
```
|
||||
sudo gnome-text-editor /etc/dnf/dnf.conf
|
||||
```
|
||||
|
||||
```
|
||||
max_parallel_downloads=10
|
||||
```
|
||||
|
||||
Open the config file using any text editor and add the below line.
|
||||
|
||||
After the update, your file should look like the one below. Save and close the file.
|
||||
|
||||
#### 2. Update your system
|
||||
|
||||
After you make the above changes and perform any other work, it’s always a good idea to update your system to ensure all the latest packages are downloaded and installed. You can open the Software application and go to the Updates Tab. Or, open a terminal and use the following command to update your system.
|
||||
|
||||
```
|
||||
sudo dnf update
|
||||
```
|
||||
|
||||
```
|
||||
sudo dnf upgrade
|
||||
```
|
||||
|
||||
![dnf update][1]
|
||||
|
||||
#### 3. Firmware Updates
|
||||
|
||||
If your hardware manufacturer supports a special firmware package for Linux, you can quickly check them and get those updates via the following sequence of commands. However, it may not always be available, but it is worth trying.
|
||||
|
||||
```
|
||||
sudo fwupdmgr refresh --forcesudo fwupdmgr get-updatessudo fwupdmgr update
|
||||
```
|
||||
|
||||
#### 4. Change Touchpad settings
|
||||
|
||||
If you are a Laptop user, check whether the “Tap to Click” option is enabled in the settings. Open the Settings application, navigate to the “Mouse and Touchpad” tab and verify.
|
||||
|
||||
#### 5. Enable RPM Fusion
|
||||
|
||||
The RPM Fusion library is a set of packages and applications provided by the community. For example, DVD or media codecs, etc. The Official Fedora repo does not offer them because of proprietary in nature. You can read our complete guide here to [enable RPM Fusion in Fedora][2]. Or, run the following commands in sequence to make it available for Fedora 36.
|
||||
|
||||
```
|
||||
sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
|
||||
```
|
||||
|
||||
```
|
||||
sudo dnf install https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
|
||||
```
|
||||
|
||||
After the above commands are complete, run the following to update your system.
|
||||
|
||||
```
|
||||
sudo dnf upgrade --refreshsudo dnf groupupdate core
|
||||
```
|
||||
|
||||
#### 6. Install GNOME Tweaks
|
||||
|
||||
The GNOME Tweaks is the essential application for Fedora 36 Workstation. It helps you to manage many areas of your GNOME desktop. After installation, you can launch it via the application menu. To install, run the following commands from the terminal.
|
||||
|
||||
```
|
||||
sudo dnf install gnome-tweak-tool
|
||||
```
|
||||
|
||||
#### 7. Enable Flatpak and Install Extensions
|
||||
|
||||
The more we are moving ahead with the adaptation of sandboxing of applications, Flatpak is becoming more and more essential on the Linux desktop. Arguably, Flatpak performs better and is widely adopted compared to Snap.
|
||||
|
||||
Hence, you should enable Flatpak beforehand as you continue to make your system productive.
|
||||
|
||||
Open a terminal and run the below command to enable Flatpak.
|
||||
|
||||
```
|
||||
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
||||
```
|
||||
|
||||
Then you can check out several applications available in [Flathub][3] to install.
|
||||
|
||||
However, one particular application that we recommend installing via Flathub is “[Extensions][4]“. This application helps you manage all the installed GNOME Extensions in your system. You can enable/disable them, launch settings of individual extensions and many such housekeeping tasks related to extensions. To install, open a terminal and run the below command. Once completed, you can launch the Extension application from the application menu.
|
||||
|
||||
```
|
||||
flatpak install flathub org.gnome.Extensions
|
||||
```
|
||||
|
||||
Alternatively, another application, “[Extension Manager][5]“, gives you some additional settings, and you may also try that via the below command.
|
||||
|
||||
```
|
||||
flatpak install flathub com.mattjakeman.ExtensionManager
|
||||
```
|
||||
|
||||
#### 8. Enable GNOME Extensions
|
||||
|
||||
Since we are talking about extensions, you need to set up your system before you install them. Open a terminal and run the below command to install the plugin to enable the hook to install extensions via the Firefox web browser.
|
||||
|
||||
```
|
||||
sudo dnf install chrome-gnome-shell
|
||||
```
|
||||
|
||||
Then open Firefox, and [visit this page][6]. And at the top, click on “install browser extension” and Continue.
|
||||
|
||||
![Add Browser Add-on for GNOME Shell Extension][7]
|
||||
|
||||
#### 9. Install these recommended GNOME Extensions
|
||||
|
||||
There are hundreds of GNOME Extensions available for various needs on the [official website][8]. However, here’s a curated list that we think should be installed by everyone while using Fedora 36 with the latest GNOME 42 desktop.
|
||||
|
||||
**Dash to Dock** (for COSMIC): Convert the bottom dock to a fully functional application dock with features such as autohide, extend to edges, move around and always show.
|
||||
|
||||
**GSConnet**: Install this extension if you want to get notification and SMS alerts from your Android mobile phone to the GNOME desktop. This is an alternative to KDE Connect for GNOME Desktop.
|
||||
|
||||
**Just Perfection**: This extension helps you make any changes to your GNOME Shell. You can change the visibility of almost all components of GNOME Shell, behaviour tweaks and customise panels, and more.
|
||||
|
||||
[Blur My Shell:][9]The default GNOME activities background is grey while showing the wallpaper of the workspaces. This extension makes your background wallpaper blur and gives a nice blurry drop shadow to the workspaces. And it comes with many other options as well.
|
||||
|
||||
[Net Speed Simplified:][10]This extension shows the data transfer speed of your active network as upload/download speed right at the top panel.
|
||||
|
||||
#### 10. Install Recommended Applications
|
||||
|
||||
The default GNOME Desktop brings very minimal required applications. They are not sufficient for a functioning and productive desktop. Hence, here’s a quick list of commands with essential applications that you can install, including a media player, torrent client, image editor, and more.
|
||||
|
||||
Copy and paste these into the terminal to install.
|
||||
|
||||
```
|
||||
sudo dnf install -y vlcsudo dnf install -y steamsudo dnf install -y transmissionsudo dnf install -y gimpsudo dnf install -y gearysudo dnf install -y dropbox nautilus-dropboxsudo dnf install -y unzip p7zip p7zip-plugins unrar
|
||||
```
|
||||
|
||||
If you prefer Flatpaks, here’s the command for that.
|
||||
|
||||
```
|
||||
flatpak install flathub org.videolan.VLCflatpak install flathub com.valvesoftware.Steamflatpak install flathub com.transmissionbt.Transmissionflatpak install flathub org.gimp.GIMPflatpak install flathub org.gnome.Gearyflatpak install flathub com.dropbox.Client
|
||||
```
|
||||
|
||||
### Bonus Tip(s)
|
||||
|
||||
And finally, here are three bonus tips exclusively for you.
|
||||
|
||||
#### Enable Battery percentage
|
||||
|
||||
If you want to view the battery percentage at the system tray, run the following command to show it via settings.
|
||||
|
||||
```
|
||||
gsettings set org.gnome.desktop.interface show-battery-percentage true
|
||||
```
|
||||
|
||||
#### Install nice looking fonts
|
||||
|
||||
GNOME desktop’s default font on Fedora 36 is perfect. But if you crave more, here are some of the cool fonts you can install. After installation, you can use GNOME Tweak Tool to change.
|
||||
|
||||
```
|
||||
sudo dnf install -y 'google-roboto*' 'mozilla-fira*' fira-code-fonts
|
||||
```
|
||||
|
||||
#### TLP
|
||||
|
||||
Last but not least, you should install TLP if you are a Laptop user. TLP is a great utility to help optimise your Laptop’s battery. This utility comes with various command-line options to tweak and view reports about power consumption. All you need to do is install and forget it. It takes care of the basic power-saving optimisations.
|
||||
|
||||
```
|
||||
sudo dnf install tlp tlp-rdw
|
||||
```
|
||||
|
||||
### Closing Notes
|
||||
|
||||
I hope you enjoyed reading these tips and applied some of them. So, what is your favourite must-do post-install tip? Let me know in the comment box down below!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.debugpoint.com/2022/05/10-things-to-do-fedora-36-after-install/
|
||||
|
||||
作者:[Arindam][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.debugpoint.com/author/admin1/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://www.debugpoint.com/wp-content/uploads/2020/10/dnf-update.png
|
||||
[2]: https://www.debugpoint.com/2020/07/enable-rpm-fusion-fedora-rhel-centos/
|
||||
[3]: https://flathub.org/
|
||||
[4]: https://flathub.org/apps/details/org.gnome.Extensions
|
||||
[5]: https://flathub.org/apps/details/com.mattjakeman.ExtensionManager
|
||||
[6]: https://extensions.gnome.org/
|
||||
[7]: https://www.debugpoint.com/wp-content/uploads/2022/03/Add-Browser-Add-on-for-GNOME-Shell-Extension.jpg
|
||||
[8]: https://extensions.gnome.org/
|
||||
[9]: https://extensions.gnome.org/extension/3193/blur-my-shell/
|
||||
[10]: https://extensions.gnome.org/extension/3724/net-speed-simplified/
|
@ -1,336 +0,0 @@
|
||||
[#]: subject: "How To Upgrade To Fedora 36 From Fedora 35 [Workstation And Server]"
|
||||
[#]: via: "https://ostechnix.com/upgrade-to-fedora-36-from-fedora-35/"
|
||||
[#]: author: "sk https://ostechnix.com/author/sk/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
How To Upgrade To Fedora 36 From Fedora 35 [Workstation And Server]
|
||||
======
|
||||
A Step By Step Guide To Upgrade Fedora 35 To Fedora 36
|
||||
|
||||
Fedora 36 has been released! This step by step tutorial tutorial explains how to upgrade to Fedora 36 from Fedora 35 and older versions. If you're already using Fedora 35, you can now safely upgrade to Fedora 36 desktop or server edition for latest features, performance and stability improvements.
|
||||
|
||||
### Prerequisites
|
||||
|
||||
Before upgrading to Fedora 36, you need to do a few important tasks.
|
||||
|
||||
1. It is strongly RECOMMENDED to Backup your important data before upgrading to Fedora 36. This should be your first step when you want to upgrade any system, regardless of the underlying operating system. Make sure you've backup of all important files, directories, configuration settings, browser bookmarks, and dot files etc.
|
||||
2. Fedora 36 upgrade will probably take several minutes to complete. So make sure you've stable Internet connection and uninterrupted power supply.
|
||||
3. During upgrade, your system will reboot automatically to apply updates. So ensure that there aren't any important jobs currently running (E.g. Scheduled backups).
|
||||
4. See the Fedora 36 common issues and decide if you want to proceed.
|
||||
5. Upgrades to the very next release (e.g. 35 to 36) as well as upgrades skipping one release (e.g. 34 to 36) are both supported. Upgrades across more than two releases are not supported. For example - you can't go from Fedora 33 to 36. It might work sometimes. However, if you encounter with any issues, you won't get any support. In such cases, first upgrade to next release (i.e. 33 to 34) and then try to upgrade from 34 to 36. It is always recommended to upgrade to next release before it reaches EOL.
|
||||
|
||||
Well, without further ado, let us start Fedora 36 upgrade task!
|
||||
|
||||
### Upgrade to Fedora 36 From Fedora 35
|
||||
|
||||
We can upgrade to Fedora 36 via GNOME software (GUI) and from command line (CLI). First, we will see the Graphical method using GNOME Software. This is suitable for those who use Fedora desktop edition.
|
||||
|
||||
Before get started, update your Fedora 35 system:
|
||||
|
||||
```
|
||||
$ sudo dnf --refresh update
|
||||
```
|
||||
|
||||
```
|
||||
$ sudo dnf upgrade
|
||||
```
|
||||
|
||||
Reboot your system to apply the updates:
|
||||
|
||||
```
|
||||
$ sudo reboot
|
||||
```
|
||||
|
||||
Let us check the current version using the following commands:
|
||||
|
||||
```
|
||||
$ cat /etc/fedora-release
|
||||
```
|
||||
|
||||
To view the detailed version output, run this instead:
|
||||
|
||||
```
|
||||
$ cat /etc/os-release
|
||||
```
|
||||
|
||||
![Display Fedora Version][1]
|
||||
|
||||
Now, follow any one of the below methods to upgrade Fedora to 36 desktop or server.
|
||||
|
||||
#### 1. Upgrade To Fedora 36 Workstation Via GNOME Software
|
||||
|
||||
**Step 1:** Open your Gnome Software Center and go to **Updates** section. You will see a notification that says - **Fedora 36 Now Available**. Click the Download button to download Fedora 36 packages.
|
||||
|
||||
![Download Fedora 36 From Gnome Software][2]
|
||||
|
||||
The required packages will be downloaded now. This will take a while depending on the Internet speed.
|
||||
|
||||
![Downloading Fedora Linux 36][3]
|
||||
|
||||
**Step 2:** Once the download is complete, you will be prompted to restart and upgrade. Click the "Restart & Upgrade" button to continue installing the updates.
|
||||
|
||||
![Click Restart And Upgrade Button][4]
|
||||
|
||||
**Step 3:** A new pop up window will appear and prompt you to click **Restart & Install Upgrade**. Just click on it to reboot your Fedora system.
|
||||
|
||||
![Click Restart And Install Upgrade Button][5]
|
||||
|
||||
After system reboot, the downloaded packages will be installed. This will take a while depending on the number of packages to install. Make sure your system is plugged into the power outlet and you have uninterrupted power supply.
|
||||
|
||||
![Installing Updates][6]
|
||||
|
||||
After installing the updates, the system will automatically reboot into the brand new Fedora 36 desktop.
|
||||
|
||||
You can check if your Fedora system is up-to-date under **Updates** section in Gnome Software.
|
||||
|
||||
![Check For Updates In Gnome Software][7]
|
||||
|
||||
Congratulations! We've successfully upgraded to Fedora 36!
|
||||
|
||||
**Step 4:** Open a Terminal window and check the installed Fedora version using command:
|
||||
|
||||
```
|
||||
$ cat /etc/fedora-release
|
||||
Fedora release 36 (Thirty Six)
|
||||
```
|
||||
|
||||
To view the detailed output, run:
|
||||
|
||||
```
|
||||
$ cat /etc/os-release
|
||||
```
|
||||
|
||||
**Sample output:**
|
||||
|
||||
```
|
||||
NAME="Fedora Linux"
|
||||
VERSION="36 (Workstation Edition)"
|
||||
ID=fedora
|
||||
VERSION_ID=36
|
||||
VERSION_CODENAME=""
|
||||
PLATFORM_ID="platform:f36"
|
||||
PRETTY_NAME="Fedora Linux 36 (Workstation Edition)"
|
||||
ANSI_COLOR="0;38;2;60;110;180"
|
||||
LOGO=fedora-logo-icon
|
||||
CPE_NAME="cpe:/o:fedoraproject:fedora:36"
|
||||
HOME_URL="https://fedoraproject.org/"
|
||||
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f36/system-administrators-guide/"
|
||||
SUPPORT_URL="https://ask.fedoraproject.org/"
|
||||
BUG_REPORT_URL="https://bugzilla.redhat.com/"
|
||||
REDHAT_BUGZILLA_PRODUCT="Fedora"
|
||||
REDHAT_BUGZILLA_PRODUCT_VERSION=36
|
||||
REDHAT_SUPPORT_PRODUCT="Fedora"
|
||||
REDHAT_SUPPORT_PRODUCT_VERSION=36
|
||||
PRIVACY_POLICY_URL="https://fedoraproject.org/wiki/Legal:PrivacyPolicy"
|
||||
VARIANT="Workstation Edition"
|
||||
VARIANT_ID=workstation
|
||||
```
|
||||
|
||||
![Check Fedora 36 Version From Terminal][8]
|
||||
|
||||
Alternatively, You can check the Fedora version under **Settings -> About** section.
|
||||
|
||||
![Check Fedora 36 Version From Settings Section][9]
|
||||
|
||||
#### 2. Upgrade To Fedora 36 Server From Commandline
|
||||
|
||||
This method is for those who runs Fedora server edition in their system.
|
||||
|
||||
**Step 1:** Update Fedora 35 server using command:
|
||||
|
||||
```
|
||||
$ sudo dnf --refresh update
|
||||
```
|
||||
|
||||
```
|
||||
$ sudo dnf upgrade
|
||||
```
|
||||
|
||||
Reboot your system to apply the updates.
|
||||
|
||||
```
|
||||
$ sudo reboot
|
||||
```
|
||||
|
||||
**Step 2:** Install dnf upgrade plugin by running the following command:
|
||||
|
||||
```
|
||||
$ sudo dnf install dnf-plugin-system-upgrade
|
||||
```
|
||||
|
||||
**Step 3:** Download Fedora 36 packages using command:
|
||||
|
||||
```
|
||||
$ sudo dnf system-upgrade download --releasever=36
|
||||
```
|
||||
|
||||
This command will download all latest packages and display the summary of what packages are going to be replaced, updated, upgraded, or downgraded. This task should take several minutes to complete as it downloads a lot of packages.
|
||||
|
||||
If some of your packages have unsatisfied dependencies, the upgrade will refuse to continue until you run it again with an extra `--allowerasing` option.
|
||||
|
||||
```
|
||||
$ sudo dnf system-upgrade download --releasever=36 --allowerasing
|
||||
```
|
||||
|
||||
**Step 4:** Once all packages are downloaded, run the following command to start actual upgrade.
|
||||
|
||||
```
|
||||
$ sudo dnf system-upgrade reboot
|
||||
```
|
||||
|
||||
Your system will reboot automatically and upgrade task will start to install all downloaded packages.
|
||||
|
||||
Upon successful upgrade, the system reboots into the new Fedora 36 server edition.
|
||||
|
||||
That's it. Start using your newly upgraded Fedora 36 server system.
|
||||
|
||||
### Fedora Post-upgrade Tasks
|
||||
|
||||
In this section, we will discuss about a few post-upgrade tasks such as changing the hostname, removing unwanted packages, updating configuration files, deleting orphaned symlinks, and cleaning up old kernels etc.
|
||||
|
||||
The steps provided below are applicable for both Fedora desktop and server editions.
|
||||
|
||||
#### 1. Change Hostname
|
||||
|
||||
I usually use distribution's name as hostname. For example, the hostname for my Fedora 34 desktop would be **fedora34**. If you're anything like me, change the hostname to match with your current version.
|
||||
|
||||
To **change hostname**, run:
|
||||
|
||||
```
|
||||
$ sudo hostnamectl set-hostname fedora36
|
||||
```
|
||||
|
||||
#### 2. Clean DNF Metadata Cache
|
||||
|
||||
After upgrade, the cached metadata and transacation can cleared using the following commands:
|
||||
|
||||
```
|
||||
$ sudo dnf system-upgrade clean
|
||||
```
|
||||
|
||||
```
|
||||
$ sudo dnf clean packages
|
||||
```
|
||||
|
||||
#### 3. Remove Old Packages
|
||||
|
||||
List all packages with broken or unsatisfied dependencies, run:
|
||||
|
||||
```
|
||||
$ sudo dnf update
|
||||
```
|
||||
|
||||
```
|
||||
$ sudo dnf repoquery --unsatisfied
|
||||
```
|
||||
|
||||
List all duplicate packages using command:
|
||||
|
||||
```
|
||||
$ sudo dnf repoquery --duplicates
|
||||
```
|
||||
|
||||
List all packages that are not in the repositories:
|
||||
|
||||
```
|
||||
$ sudo dnf list extras
|
||||
```
|
||||
|
||||
If you don't need them anymore, simply run the following commands to remove old, and unused packages.
|
||||
|
||||
```
|
||||
$ sudo dnf remove $(sudo dnf repoquery --extras --exclude=kernel,kernel-*)
|
||||
```
|
||||
|
||||
```
|
||||
$ sudo dnf autoremove
|
||||
```
|
||||
|
||||
#### 4. Clean Up Retired Packages
|
||||
|
||||
A few packages will be retired in each Fedora release. They could be obsolete or the maintainer abandoned the packages. The retired packages packages will not get any updates. Not even security updates.
|
||||
|
||||
To remove obsolete and retired packages, run:
|
||||
|
||||
```
|
||||
$ sudo dnf install remove-retired-packages
|
||||
```
|
||||
|
||||
```
|
||||
$ remove-retired-packages
|
||||
```
|
||||
|
||||
#### 5. Update System Configuration Files
|
||||
|
||||
To update system configuration files, use `rpmconf` tool.
|
||||
|
||||
To install `rpmconf` tool, run:
|
||||
|
||||
```
|
||||
$ sudo dnf install rpmconf
|
||||
```
|
||||
|
||||
Once the install is complete, run the following command:
|
||||
|
||||
```
|
||||
$ sudo rpmconf -a
|
||||
```
|
||||
|
||||
#### 6. Clean Up Old Kernels
|
||||
|
||||
The `dnf autoremove` command will not remove any unused kernels to avoid unintentional Kernel removals. If you want to remove old kernels, you can use the following command:
|
||||
|
||||
```
|
||||
$ sudo dnf remove $(dnf repoquery --installonly --latest-limit=-3)
|
||||
```
|
||||
|
||||
The above command will remove all old kernels and retain only the latest 3 kernels.
|
||||
|
||||
**Heads Up:** It is HIGHLY RECOMMENDED to **keep at least two kernels**. Because, if there is a problem in the current Kernel version after upgrading, you can safely switch to the older kernel.
|
||||
|
||||
#### 7. Remove Broken Symlinks
|
||||
|
||||
After system upgrade, there would be some unused symlinks left in your system. You need to **find and delete the dangling soft links or symlinks** that don't point anywhere.
|
||||
|
||||
To find broken symlinks in `/usr` directory, run:
|
||||
|
||||
```
|
||||
$ sudo symlinks -r /usr | grep dangling
|
||||
```
|
||||
|
||||
To remove the dangling symlinks, run:
|
||||
|
||||
```
|
||||
$ sudo symlinks -r -d /usr
|
||||
```
|
||||
|
||||
### Conclusion
|
||||
|
||||
In this guide, we have seen how to upgrade to Fedora 36 from Fedora 35 via Gnome Software center and from terminal. At the end, we included a few post-upgrade steps that needs to done to cleanup the fedora system.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://ostechnix.com/upgrade-to-fedora-36-from-fedora-35/
|
||||
|
||||
作者:[sk][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://ostechnix.com/author/sk/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://ostechnix.com/wp-content/uploads/2022/05/Display-Fedora-Version.png
|
||||
[2]: https://ostechnix.com/wp-content/uploads/2022/05/Download-Fedora-36-From-Gnome-Software.png
|
||||
[3]: https://ostechnix.com/wp-content/uploads/2022/05/Downloading-Fedora-Linux-36.png
|
||||
[4]: https://ostechnix.com/wp-content/uploads/2022/05/Click-Restart-And-Upgrade-Button.png
|
||||
[5]: https://ostechnix.com/wp-content/uploads/2022/05/Click-Restart-And-Install-Upgrade-Button.png
|
||||
[6]: https://ostechnix.com/wp-content/uploads/2022/05/Installing-Updates.png
|
||||
[7]: https://ostechnix.com/wp-content/uploads/2022/05/Check-For-Updates-In-Gnome-Software.png
|
||||
[8]: https://ostechnix.com/wp-content/uploads/2022/05/Check-Fedora-36-Version-From-Terminal.png
|
||||
[9]: https://ostechnix.com/wp-content/uploads/2022/05/Check-Fedora-36-Version-From-Settings-Section.png
|
@ -1,218 +0,0 @@
|
||||
[#]: subject: "Add, Delete And Grant Sudo Privileges To Users In Fedora 36"
|
||||
[#]: via: "https://ostechnix.com/add-delete-and-grant-sudo-privileges-to-users-in-fedora/"
|
||||
[#]: author: "sk https://ostechnix.com/author/sk/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Add, Delete And Grant Sudo Privileges To Users In Fedora 36
|
||||
======
|
||||
Create sudo user in Fedora
|
||||
|
||||
Using `sudo` program, we can elevate the ability of a normal user to run administrative tasks, without giving away the `root` user's password in Linux operating systems. This guide explains how to add, delete and grant sudo privileges to users in Fedora 36 desktop and server editions.
|
||||
|
||||
I've divided this guide in three sections. The first section teaches you how to create a new user. In the second section, you'll learn how to give sudo access to the existing user. And in the last section, you will know how to remove sudo access from a user. I've also provided example commands in each section, so you can understand it better.
|
||||
|
||||
First, we will start with giving sudo access to a new user.
|
||||
|
||||
### 1. Create A New User In Fedora
|
||||
|
||||
Login to your Fedora system as `root` user or `sudo` user.
|
||||
|
||||
We can use either `useradd` or `adduser` commands to create users in Linux.
|
||||
|
||||
For the purpose of this guide, I am going to create a new user called **"senthil"** using `adduser` command.
|
||||
|
||||
To do so, I run the following command with `sudo` or `root` privilege:
|
||||
|
||||
```
|
||||
$ sudo adduser senthil
|
||||
```
|
||||
|
||||
Next, I am going to set a password to the newly created user "senthil" with `passwd` command:
|
||||
|
||||
```
|
||||
$ sudo passwd senthil
|
||||
```
|
||||
|
||||
![Create A New User In Fedora][1]
|
||||
|
||||
We just created a normal user called "senthil". This user has not been given sudo access yet. So he can't perform any administrative tasks.
|
||||
|
||||
You can verify if an user has sudo access or not like below.
|
||||
|
||||
```
|
||||
$ sudo -l -U senthil
|
||||
```
|
||||
|
||||
**Sample output:**
|
||||
|
||||
```
|
||||
User senthil is not allowed to run sudo on fedora.
|
||||
```
|
||||
|
||||
![Check If An User Has Sudo Access][2]
|
||||
|
||||
As you can see, the user "senthil" is not yet allowed to run sudo. Let us go ahead and give him sudo access in the following steps.
|
||||
|
||||
### 2. Grant Sudo Privileges To Users In Fedora
|
||||
|
||||
To add a normal user to **sudoers** group, simply add him/her to the `wheel` group.
|
||||
|
||||
For those wondering, the `wheel` is a special group in some Unix-like operating systems (E.g. RHEL based systems). All the members of `wheel` group are allowed to perform administrative tasks. Wheel group is similar to `sudo` group in Debian-based systems.
|
||||
|
||||
We can add users to sudoers list in two ways. The first method is by using `chmod` command.
|
||||
|
||||
#### 2.1. Add Users To Sudoers Using Usermod Command
|
||||
|
||||
```
|
||||
Usermod
|
||||
```
|
||||
|
||||
To grant sudo privileges to a user called "senthil", just add him to the `wheel` group using `usermod` command as shown below:
|
||||
|
||||
```
|
||||
$ sudo usermod -aG wheel senthil
|
||||
```
|
||||
|
||||
Here, `-aG` refers append to a supplementary group. In our case, it is `wheel` group.
|
||||
|
||||
Verify if the user is in the sudoers list with command:
|
||||
|
||||
```
|
||||
$ sudo -l -U senthil
|
||||
```
|
||||
|
||||
If you output something like below, it means the user has been given sudo access and he can able to perform all administrative tasks.
|
||||
|
||||
```
|
||||
Matching Defaults entries for senthil on fedora:
|
||||
!visiblepw, always_set_home, match_group_by_gid, always_query_group_plugin,
|
||||
env_reset, env_keep="COLORS DISPLAY HOSTNAME HISTSIZE KDEDIR LS_COLORS",
|
||||
env_keep+="MAIL QTDIR USERNAME LANG LC_ADDRESS LC_CTYPE",
|
||||
env_keep+="LC_COLLATE LC_IDENTIFICATION LC_MEASUREMENT LC_MESSAGES",
|
||||
env_keep+="LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE",
|
||||
env_keep+="LC_TIME LC_ALL LANGUAGE LINGUAS _XKB_CHARSET XAUTHORITY",
|
||||
secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin\:/var/lib/snapd/snap/bin
|
||||
|
||||
User senthil may run the following commands on fedora:
|
||||
(ALL) ALL
|
||||
```
|
||||
|
||||
![Add A User To Sudoers Group Using Usermod Command][3]
|
||||
|
||||
As you see in the above output, the user "Senthil" can run ALL commands on any host.
|
||||
|
||||
#### 2.2. Add Users To Sudoers By Editing Sudoers Configuration File
|
||||
|
||||
The another way to add users to sudoers list is by directly adding him/her to the sudoers configuration file.
|
||||
|
||||
Edit sudoers configuration file using command:
|
||||
|
||||
```
|
||||
$ sudo visudo
|
||||
```
|
||||
|
||||
This will open `/etc/sudoers` file in your **Vi** editor or whatever you have in your `$PATH`. Scroll down until you find following entry:
|
||||
|
||||
```
|
||||
root ALL=(ALL) ALL
|
||||
```
|
||||
|
||||
Right after the above entry, add the following line:
|
||||
|
||||
```
|
||||
senthil ALL=(ALL) ALL
|
||||
```
|
||||
|
||||
![Add Users To Sudoers Group By Editing Sudoers Configuration File][4]
|
||||
|
||||
Here, the line `ALL=(ALL) ALL` refers the user "senthil" can perform any commands on any host. Replace "senthil" with your own username. Save the file and close it.
|
||||
|
||||
That's it. The user has been granted sudo access.
|
||||
|
||||
#### 2.3. Verify Sudo Users
|
||||
|
||||
Log out from the current session and log back in as the newly created sudo user. Alternatively, you can directly switch to the other user, without having to log out from the current session, using the following command:
|
||||
|
||||
```
|
||||
$ sudo -i -u senthil
|
||||
```
|
||||
|
||||
![Switch To New User In Fedora Linux][5]
|
||||
|
||||
Now, verify if the user can able to perform any administrative task with `sudo` permission:
|
||||
|
||||
```
|
||||
$ sudo dnf --refresh update
|
||||
```
|
||||
|
||||
![Run Dnf Update Command With Sudo][6]
|
||||
|
||||
Great! The user can able to run the `dnf update` command with sudo privilege. From now on, the user can perform all commands prefixed with sudo.
|
||||
|
||||
### 3. Delete Sudo Access From A User
|
||||
|
||||
Make sure you logged out of the user's session and log back in as `root` or some other sudo user. Because you can't delete the sudo access of the currently logged in user.
|
||||
|
||||
We can remove sudo privileges from an user without having to entirely delete the user account.
|
||||
|
||||
To do so, use `gpasswd` command to revoke sudo permissions from a user:
|
||||
|
||||
```
|
||||
$ sudo gpasswd -d senthil wheel
|
||||
```
|
||||
|
||||
**Sample output:**
|
||||
|
||||
```
|
||||
Removing user senthil from group wheel
|
||||
```
|
||||
|
||||
This will only remove sudo privilege of the given user. The user still exists in the system
|
||||
|
||||
Verify if the sudo access has been removed using command:
|
||||
|
||||
```
|
||||
$ sudo -l -U senthil
|
||||
User senthil is not allowed to run sudo on fedora35.
|
||||
```
|
||||
|
||||
![Delete Sudo Access From A User Using Gpasswd Command][7]
|
||||
|
||||
#### 3.1. Permanently Delete User
|
||||
|
||||
If you don't need the user any more, you can permanently remove the user from the system using `userdel` command like below.
|
||||
|
||||
```
|
||||
$ sudo userdel -r senthil
|
||||
```
|
||||
|
||||
The above command will delete the user "senthil" along with his `home` directory and mail spool.
|
||||
|
||||
### Conclusion
|
||||
|
||||
This concludes how to add, delete and grant sudo privileges to users in Fedora 36 operating system. This method is same for other RPM-based systems as well.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://ostechnix.com/add-delete-and-grant-sudo-privileges-to-users-in-fedora/
|
||||
|
||||
作者:[sk][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://ostechnix.com/author/sk/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://ostechnix.com/wp-content/uploads/2022/05/Create-A-New-User-In-Fedora.png
|
||||
[2]: https://ostechnix.com/wp-content/uploads/2022/05/Check-If-An-User-Has-Sudo-Access.png
|
||||
[3]: https://ostechnix.com/wp-content/uploads/2022/05/Add-A-User-To-Sudoers-Group-Using-Usermod-Command.png
|
||||
[4]: https://ostechnix.com/wp-content/uploads/2022/05/Add-Users-To-Sudoers-Group-By-Editing-Sudoers-Configuration-File.png
|
||||
[5]: https://ostechnix.com/wp-content/uploads/2022/05/Switch-To-New-User-In-Fedora-Linux.png
|
||||
[6]: https://ostechnix.com/wp-content/uploads/2022/05/Run-Dnf-Update-Command-With-Sudo.png
|
||||
[7]: https://ostechnix.com/wp-content/uploads/2022/05/Delete-Sudo-Access-From-A-User-Using-Gpasswd-Command.png
|
@ -1,155 +0,0 @@
|
||||
[#]: subject: "How Garbage Collection works inside a Java Virtual Machine"
|
||||
[#]: via: "https://opensource.com/article/22/6/garbage-collection-java-virtual-machine"
|
||||
[#]: author: "Jayashree Huttanagoudar https://opensource.com/users/jayashree-huttanagoudar"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "lkxed"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
How Garbage Collection works inside a Java Virtual Machine
|
||||
======
|
||||
Understanding how Java handles memory isn't always necessary, but it can help you envision how the JVM deals with your variables and class instances.
|
||||
|
||||
![Coffee beans][1]
|
||||
|
||||
Image by: Pixabay. CC0.
|
||||
|
||||
Automatic Garbage Collection (GC) is one of the most important features that makes Java so popular. This article explains why GC is essential. It includes automatic and generational GC, how the Java Virtual Machine (JVM) divides heap memory, and finally, how GC works inside the JVM.
|
||||
|
||||
### Java memory allocation
|
||||
|
||||
Java memory is divided into four sections:
|
||||
|
||||
1. Heap: The memory for object instances is allocated in the heap. When the object declaration is made, there won't be any memory allocated in the heap. Instead, a reference is created for that object in the stack.
|
||||
2. Stack: This section allocates the memory for methods, local variables, and class instance variables.
|
||||
3. Code: Bytecode resides in this section.
|
||||
4. Static: Static data and methods are placed in this section.
|
||||
|
||||
### What is automatic Garbage Collection (GC)?
|
||||
|
||||
Automatic GC is a process in which the referenced and unreferenced objects in heap memory are identified, and then unreferenced objects are considered for deletion. The term *referenced objects* means some part of your program is using those objects. *Unreferenced objects* are not currently being used by the program.
|
||||
|
||||
Programming languages like C and C++ require manual allocation and deallocation of memory. This is automatically handled by GC in Java, although you can trigger GC manually with the `system.gc();` call in your code.
|
||||
|
||||
The fundamental steps of GC are:
|
||||
|
||||
#### 1. Mark used and unused objects
|
||||
|
||||
In this step, the used and unused objects are marked separately. This is a time-consuming process, as all objects in memory must be scanned to determine whether they're in use or not.
|
||||
|
||||
![Marking used and unused objects][2]
|
||||
|
||||
#### 2. Sweep/Delete objects
|
||||
|
||||
There are two variations of sweep and delete.
|
||||
|
||||
**Simple deletion**: Only unreferenced objects are removed. However, the memory allocation for new objects becomes difficult as the free space is scattered across available memory.
|
||||
|
||||
![Normal deleting process][3]
|
||||
|
||||
**Deletion with compaction**: Apart from deleting unreferenced objects, referenced objects are compacted. Memory allocation for new objects is relatively easy, and memory allocation performance is improved.
|
||||
|
||||
![Deletion with compacting][4]
|
||||
|
||||
### What is generational Garbage Collection (GC), and why is it needed?
|
||||
|
||||
As seen in the sweep and delete model, scanning all objects for memory reclamation from unused objects becomes difficult once the objects keep growing. An experimental study shows that most objects created during the program execution are short-lived.
|
||||
|
||||
The existence of short-lived objects can be used to improve the performance of GC. For that, the JVM divides the memory into different generations. Next, it categorizes the objects based on these memory generations and performs the GC accordingly. This approach is known as *generational GC*.
|
||||
|
||||
### Heap memory generations and the generational Garbage Collection (GC) process
|
||||
|
||||
To improve the performance of the GC mark and sweep steps, the JVM divides the heap memory into three generations:
|
||||
|
||||
* Young Generation
|
||||
* Old Generation
|
||||
* Permanent Generation
|
||||
|
||||
![Hotspot heap structure][5]
|
||||
|
||||
Here is a description of each generation and its key features.
|
||||
|
||||
#### Young Generation
|
||||
|
||||
All created objects are present here. The young generation is further divided into:
|
||||
|
||||
1. Eden: All newly created objects are allocated with the memory here.
|
||||
2. Survivor space (S0 and S1): After surviving one GC, the live objects are moved to one of these survivor spaces.
|
||||
|
||||
![Object allocation][6]
|
||||
|
||||
The generational GC that happens in the Young Generation is known as *Minor GC*. All Minor GC cycles are "Stop the World" events that cause the other applications to pause until it completes the GC cycle. This is why Minor GC cycles are faster.
|
||||
|
||||
To summarize: Eden space has all newly created objects. Once Eden is full, the first Minor GC cycle is triggered.
|
||||
|
||||
![Filling Eden space][7]
|
||||
|
||||
Minor GC: The live and dead objects are marked during this cycle. The live objects are moved to survivor space S0. Once all live objects are moved to S0, the unreferenced objects are deleted.
|
||||
|
||||
![Copying referenced objects][8]
|
||||
|
||||
The age of objects in S0 is 1 because they have survived one Minor GC. Now Eden and S1 are empty.
|
||||
|
||||
Once cleared, the Eden space is again filled with new live objects. As time elapses, some objects in Eden and S0 become dead (unreferenced), and Eden's space is full again, triggering the Minor GC.
|
||||
|
||||
![Object aging][9]
|
||||
|
||||
This time the dead and live objects in Eden and S0 are marked. The live objects from Eden are moved to S1 with an age increment of 1. The live objects from S0 are also moved to S1 with an age increment of 2 (because they've now survived two Minor GCs). At this point, S0 and Eden are empty. After every Minor GC, Eden and one of the survivor spaces are empty.
|
||||
|
||||
The same cycle of creating new objects in Eden continues. When the next Minor GC occurs, Eden and S1 are cleared by moving the aged objects to S0. The survivor spaces switch after every Minor GC.
|
||||
|
||||
![Additional aging][10]
|
||||
|
||||
This process continues until the age of one of the surviving objects reaches a certain threshold, at which point it is moved to the so-called the Old Generation with a process called *promotion*.
|
||||
|
||||
Further, the `-Xmn` flag sets the Young Generation size.
|
||||
|
||||
### Old Generation (Tenured Generation)
|
||||
|
||||
This generation contains the objects that have survived several Minor GCs and aged to reach an expected threshold.
|
||||
|
||||
![Promotion][11]
|
||||
|
||||
In the example diagram above, the threshold is 8. The GC in the Old Generation is known as a *Major GC*. Use the flags `-Xms` and `-Xmx` to set the initial and maximum size of the heap memory.
|
||||
|
||||
### Permanent Generation
|
||||
|
||||
The Permanent Generation space stores metadata related to library classes and methods of an application, J2SE, and what's in use by the JVM itself. The JVM populates this data at runtime based on which classes and methods are in use. Once the JVM finds the unused classes, they are unloaded or collected, making space for used classes.
|
||||
|
||||
Use the flags `-XX:PermGen` and `-XX:MaxPermGen` to set the initial and maximum size of the Permanent Generation.
|
||||
|
||||
#### Metaspace
|
||||
|
||||
Metaspace was introduced in Java 8u and replaced PermGen. The advantage of this is automatic resizing, which avoids OutOfMemory errors.
|
||||
|
||||
### Wrap up
|
||||
|
||||
This article discusses the various memory generations of JVM and how they are helpful for automatic generational Garbage Collection (GC). Understanding how Java handles memory isn't always necessary, but it can help you envision how the JVM deals with your variables and class instances. This understanding allows you to plan and troubleshoot your code and comprehend potential limitations inherent in a specific platform.
|
||||
|
||||
Image by: (Jayashree Huttanagoudar, CC BY-SA 4.0)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/6/garbage-collection-java-virtual-machine
|
||||
|
||||
作者:[Jayashree Huttanagoudar][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/jayashree-huttanagoudar
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://opensource.com/sites/default/files/lead-images/java-coffee-beans.jpg
|
||||
[2]: https://opensource.com/sites/default/files/2022-06/1Marking.png
|
||||
[3]: https://opensource.com/sites/default/files/2022-06/2NormalDeletion.png
|
||||
[4]: https://opensource.com/sites/default/files/2022-06/3DeletionwithCompacting.png
|
||||
[5]: https://opensource.com/sites/default/files/2022-06/4Hotspot.png
|
||||
[6]: https://opensource.com/sites/default/files/2022-06/5ObjAllocation.png
|
||||
[7]: https://opensource.com/sites/default/files/2022-06/6FillingEden.png
|
||||
[8]: https://opensource.com/sites/default/files/2022-06/7CopyingRefdObjs.png
|
||||
[9]: https://opensource.com/sites/default/files/2022-06/8ObjAging.png
|
||||
[10]: https://opensource.com/sites/default/files/2022-06/9AddlAging.png
|
||||
[11]: https://opensource.com/sites/default/files/2022-06/10Promotion.png
|
@ -1,85 +0,0 @@
|
||||
[#]: subject: "How to Boot Ubuntu 22.04 into Rescue / Emergency Mode"
|
||||
[#]: via: "https://www.linuxtechi.com/boot-ubuntu-22-04-rescue-emergency-mode/"
|
||||
[#]: author: "Pradeep Kumar https://www.linuxtechi.com/author/pradeep/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
How to Boot Ubuntu 22.04 into Rescue / Emergency Mode
|
||||
======
|
||||
Hello geeks, booting Ubuntu 22.04 (Jammy Jellyfish) into rescue and emergency mode helps to reset the forgotten user password, fix the file system errors and disabling or enabling systemd service during boot.
|
||||
|
||||
In this post, we will learn how to boot Ubuntu 22.04 LTS system into rescue and emergency mode. Rescue mode is similar to single user mode where are all troubleshooting steps are executed. Rescue mode loads the minimal environment and mount root file system.
|
||||
|
||||
Whereas in emergency mode, we get the single user shell without starting any system services. So emergency mode is required when we can’t boot the system into rescue mode.
|
||||
|
||||
### Boot Ubuntu 22.04 into Rescue or Single User Mode
|
||||
|
||||
Head to target system which you want to boot into rescue or single user mode. At the boot press ‘SHIFT & ESC’ key to enter into grub bootloader screen.
|
||||
|
||||
![Default-Grub-Screen-Ubuntu-22-04][1]
|
||||
|
||||
Choose the first option Ubuntu and press ‘e’ to enter edit mode.
|
||||
|
||||
Go the end of line which starts with linux and delete the string ‘$vt_handoff’ and add the string ‘systemd.unit=rescue.target’
|
||||
|
||||
![rescue-target-ubuntu-22-04][2]
|
||||
|
||||
After making the changes, either press Ctrl+x or F10 to boot in rescue mode,
|
||||
|
||||
![Troubleshooting-Commands-in-Rescue-Mode][3]
|
||||
|
||||
Once you enter into rescue mode, run all troubleshooting commands and to reboot the system run ‘systemctl reboot’ command
|
||||
|
||||
### Alternate Way to Boot System into Rescue Mode
|
||||
|
||||
Reboot the system and press ‘ESC & Shift’ Key to go to grub boot screen.
|
||||
|
||||
Choose the 2nd option ‘Advanced Options for Ubuntu’ –> Choose recovery mode option and hit enter –> Choose Root (Drop to root shell prompt).
|
||||
|
||||
Example is show below
|
||||
|
||||
![Boot-Ubuntu-22-04-Rescue-Mode][4]
|
||||
|
||||
Once you have root shell, run commands to recover and fix the system issues and finally use ‘systemctl reboot’ to reboot the system.
|
||||
|
||||
### Boot Ubuntu 22.04 into Emergency Mode
|
||||
|
||||
To boot the system into emergency mode, first go to grub screen.
|
||||
|
||||
![Default-Grub-Screen-Ubuntu-22-04][5]
|
||||
|
||||
Select the first option as ‘Ubuntu’ and press ‘e’ to edit. Look for the line which starts with linux word, go to the end of that line, remove the string $vt_handoff and add the string ‘systemd.unit=emergency.target’
|
||||
|
||||
![Emergency-Mode-Ubuntu-22-04][6]
|
||||
|
||||
Press Ctrl+x or F10 to boot the system into emergency mode,
|
||||
|
||||
![Command-in-Emergency-Mode-Ubuntu-22-04][7]
|
||||
|
||||
Similarly in rescue mode, you can perform all the troubleshooting in this mode and once done reboot the system with command ‘systemctl reboot’.
|
||||
|
||||
That’s all from this post. I found it informative and don’t hesitate to share this among your technical friends. Kindly post your queries and feedback in below comments section.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.linuxtechi.com/boot-ubuntu-22-04-rescue-emergency-mode/
|
||||
|
||||
作者:[Pradeep Kumar][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.linuxtechi.com/author/pradeep/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://www.linuxtechi.com/wp-content/uploads/2022/06/Default-Grub-Screen-Ubuntu-22-04.png
|
||||
[2]: https://www.linuxtechi.com/wp-content/uploads/2022/06/rescue-target-ubuntu-22-04.png
|
||||
[3]: https://www.linuxtechi.com/wp-content/uploads/2022/06/Troubleshooting-Commands-in-Rescue-Mode.png
|
||||
[4]: https://www.linuxtechi.com/wp-content/uploads/2022/06/Boot-Ubuntu-22-04-Rescue-Mode.gif
|
||||
[5]: https://www.linuxtechi.com/wp-content/uploads/2022/06/Default-Grub-Screen-Ubuntu-22-04.png
|
||||
[6]: https://www.linuxtechi.com/wp-content/uploads/2022/06/Emergency-Mode-Ubuntu-22-04.png
|
||||
[7]: https://www.linuxtechi.com/wp-content/uploads/2022/06/Command-in-Emergency-Mode-Ubuntu-22-04.png
|
@ -1,90 +0,0 @@
|
||||
[#]: subject: "Edit PDFs on Linux with these open source tools"
|
||||
[#]: via: "https://opensource.com/article/22/6/open-source-pdf-editors-linux"
|
||||
[#]: author: "Michael Korotaev https://opensource.com/users/michaelk"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Edit PDFs on Linux with these open source tools
|
||||
======
|
||||
Open source alternatives to Adobe Acrobat have all the necessary features for creating, editing, and annotating PDFs.
|
||||
|
||||
![a checklist for a team][1]
|
||||
|
||||
Image by: Opensource.com
|
||||
|
||||
Open source reading and editing tools for PDFs are often more secure and reliable alternatives to the applications residing in the first pages of "PDF editor" search results. There, you're likely to see proprietary applications with hidden limitations and tariffs, lacking sufficient information about data protection policies and hosting. You can have better.
|
||||
|
||||
Here are five applications that can be installed on your Linux system (and others) or hosted on a server. Each is free and open source, with all the necessary features for creating, editing, and annotating PDF files.
|
||||
|
||||
### LibreOffice
|
||||
|
||||
With the [LibreOffice][2] suite, your choice of application depends on the initial task. While LibreOffice Writer, a word processor, lets you create PDF files with export from text formats like ODF and others, Draw is better for working with existing PDF files.
|
||||
|
||||
Draw is meant for creating and editing graphic documents, such as brochures, magazines, and posters. The toolset is therefore mainly focused on visual objects and layouts. For PDF editing, however, LibreOffice Draw offers tools for modifying and adding content in PDFs when the file has editing attributes. You can still add new text fields on the existing content layers and annotate or finish the documents if it doesn't.
|
||||
|
||||
Draw and Writer are both bundled in a LibreOffice desktop suite available for installation on Linux systems, macOS, and Windows.
|
||||
|
||||
### ONLYOFFICE Docs
|
||||
|
||||
ONLYOFFICE has been improving work with PDFs for a while and introduced a brand new reader for PDFs and eBooks in version 7.1 of [ONLYOFFICE Docs][3].
|
||||
|
||||
The document editor allows creating PDF files from scratch using DOCX as a base for files that can then be converted to PDF or PDF/A. With built-in form-creation functionality, ONLYOFFICE Docs also makes it possible to build fillable document templates and export them as editable PDFs with fillable fields for different types of content: text, images, dates, and more.
|
||||
|
||||
In addition to recognizing text within PDFs to copy and extract it, ONLYOFFICE Docs can convert PDFs to DOCX, which allows you to continue using the documents in fully editable text formats. ONLYOFFICE also lets you secure the files with passwords, add watermarks, and use digital signatures available in the desktop version.
|
||||
|
||||
ONLYOFFICE Docs can be used as a web suite (on-premises or in the cloud) integrated into a document management system (DMS) or as a standalone desktop application. You can install the latter as a DEB or RPM file, AppImage, Flatpack, and several other formats for Linux.
|
||||
|
||||
### PDF Arranger
|
||||
|
||||
[PDF Arranger][4] is a front-end application for the PikePDF library. It doesn't edit the content of a PDF the way LibreOffice and ONLYOFFICE do, but it's great for re-ordering pages, splitting a PDF into smaller documents, merging several PDFs into one, rotating or cropping pages, and so on. Its interface is intuitive and easy to use.
|
||||
|
||||
PDF Arranger is available for Linux and Windows.
|
||||
|
||||
### Okular
|
||||
|
||||
[Okular][5] is a free open source viewer for documents developed by the KDE community. The app features very mature functionality and allows viewing PDFs, eBooks, images, and comics.
|
||||
|
||||
Okular has full or partial support for most popular PDF features and use cases, such as adding annotations and inline notes or inserting text boxes, shapes, and stamps. You can also add a digitally encrypted signature to your document so your readers can be sure of the document's source.
|
||||
|
||||
In addition to adding texts and images in PDFs, it's also possible to retrieve them from the document to copy and paste somewhere else. The Area Selection tool in Okular can identify the components within a selected area so you can extract them from the PDF independently of one another.
|
||||
|
||||
You can install Okular using your distribution's package manager or as a Flatpak.
|
||||
|
||||
### Xournal++
|
||||
|
||||
[Xournal++][6] is a handwriting journal software with annotation tools for PDF files.
|
||||
|
||||
Created to be notetaking software with enhanced handwriting features, it may not be the best option for working with text-based content and professional layouts. However, its ability to render graphics and support for stylus input in writing and drawing make it stand out as a niche productivity tool.
|
||||
|
||||
PDF annotation and sketching are made comfortable with layer management tools, customizable pen point settings, and support for stylus mappings. Xournal++ also has a text tool for adding text boxes and the ability to insert images.
|
||||
|
||||
Xournal++ has installation options for Linux systems (Ubuntu, Debian, Arch, SUSE), macOS, and Windows (10 and above).
|
||||
|
||||
### Summary
|
||||
|
||||
If you're looking for a free and safe alternative to proprietary PDF viewing and editing software, it is not hard to find an open source option, whether for desktop or online use. Just keep in mind that the currently available solutions have their own advantages for different use cases, and there's no single tool that is equally great at all possible tasks.
|
||||
|
||||
These five solutions stand out for their functionality or usefulness for niche PDF tasks. For enterprise use and collaboration, I suggest ONLYOFFICE or LibreOffice Draw. PDF Arranger is a simple, lightweight tool for working with pages when you don't need to alter text. Okular offers great viewer features for multiple file types, and Xournal++ is the best choice if you want to sketch and take notes in your PDFs.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/6/open-source-pdf-editors-linux
|
||||
|
||||
作者:[Michael Korotaev][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/michaelk
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://opensource.com/sites/default/files/lead-images/checklist_hands_team_collaboration.png
|
||||
[2]: https://opensource.com/article/21/9/libreoffice-tips
|
||||
[3]: https://opensource.com/article/20/12/onlyoffice-docs
|
||||
[4]: https://flathub.org/apps/details/com.github.jeromerobert.pdfarranger
|
||||
[5]: https://opensource.com/article/22/4/linux-kde-eco-certification-okular
|
||||
[6]: http://xournal.sourceforge.net/
|
@ -1,113 +0,0 @@
|
||||
[#]: subject: "Manage Flatpak Permission Using Flatseal"
|
||||
[#]: via: "https://www.debugpoint.com/2022/06/manage-flatpak-permission-flatseal/"
|
||||
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Manage Flatpak Permission Using Flatseal
|
||||
======
|
||||
Learn how to manage Flatpak permission using the Flatseal app, which gives you a friendly GUI and additional features.
|
||||
|
||||
Installing applications can be challenging in Linux from a new user standpoint. The primary reason is there are so many [Linux distributions][1]. And you need different installation methods or instructions for various Linux distributions. It can be overwhelming for some users. In addition, it’s also difficult for developers to create separate packages and builds for different distributions.
|
||||
|
||||
### Flatpak solved this problem. How?
|
||||
|
||||
It uses container tech so that the same application executable runs similarly on all Linux platforms. For example, one single executable can run in Ubuntu, Fedora, OpenSUSE, Arch Linux and many others.
|
||||
|
||||
Moreover, the developers also spend fewer efforts on packaging the same app for different platforms. And they can concentrate on the app features rather than the distributions or deployments.
|
||||
|
||||
In addition, Flatpak apps also get updates instantly, and you get the newest version as soon as it’s available.
|
||||
|
||||
All these benefits also open up an important question. What is the permission a Flatpak app needs? How do you manage them easily? For example, one app may require only network access, not disk space. Or another may have access to take screenshots, but it might not be required at all.
|
||||
|
||||
So, it is essential to review the permission of a Flatpak app. This is similar to your Android or iOS app permission.
|
||||
|
||||
Finally, even if you are a new user, it’s not that difficult to manage and review the permissions, thanks to the graphical app – Flatseal.
|
||||
|
||||
### What is Flatseal?
|
||||
|
||||
Flatseal is a Flatpak application which gives you a friendly user interface to view and change permissions of all the Flatpak apps in your system.
|
||||
|
||||
It is an excellent little app with an easy-to-use toggle button for each of the permission sections per application. Here’s how it looks (Figure 1).
|
||||
|
||||
![Figure 1 – Flatseal App][2]
|
||||
|
||||
### How do you use Flatseal to manage Flatpak Permission?
|
||||
|
||||
When opening the Flatseal app, it should list all the Flatpak apps at the left navigation bar. And once you select one application, it shows the available permission settings in the main window at the right.
|
||||
|
||||
Now, for each Flatpak permission control, the current value is shown in the toggle switch. If the permission is in use, it should be set. Otherwise, it should be greyed out.
|
||||
|
||||
First, to set permission, you must navigate to your system’s application. Then, you can enable or disable any respective control from the permission list.
|
||||
|
||||
Second, if you want to set a global control that applies to all the Flatpak in your system, you can choose “All Applications” at the left-top and apply the global setting (Figure 2).
|
||||
|
||||
![Figure 2: Manage Flatpak Permission using Flatseal][3]
|
||||
|
||||
It’s super easy. Isn’t it?
|
||||
|
||||
### Example of Managing Flatpak Permission using Flatseal
|
||||
|
||||
Let’s take an example.
|
||||
|
||||
In my system, I have the above Flatpak installed (Figure 2). Let’s pick the Telegram Desktop app. Currently, the Telegram desktop does not have permission to access any home directory or user files (Figure 3).
|
||||
|
||||
![Figure 3: Telegram Desktop Flatpak App does not have permission to the home folders][4]
|
||||
|
||||
Now, if I want to permit all user files and any specific folder (e.g. /home/Downloads), you can give it by turning the enable switch on. See the Figure 4 below.
|
||||
|
||||
![Figure 4: Permission changed of Telegram Desktop to give access to folders][5]
|
||||
|
||||
Similarly, you can enable or disable the permission you want. Under the hood, Flatseal performs the internal Flatpak commands to achieve this.
|
||||
|
||||
For example, the above scenario may translate to the following command.
|
||||
|
||||
```
|
||||
flatpak override org.telegram.desktop --filesystem=/home/Downloads
|
||||
```
|
||||
|
||||
And to remove:
|
||||
|
||||
```
|
||||
flatpak override org.telegram.desktop --nofilesystem=/home/Downloads
|
||||
```
|
||||
|
||||
There is also another cool feature of Flatseal which shows a small alert icon beside the user-specific permission changes (See Figure 4).
|
||||
|
||||
### Can I install Flatseal in all Linux distributions?
|
||||
|
||||
Yes, you can install [Flatseal][6] in all Linux Distributions as Flatpak. You can set up your system using [this guide][7] and run the following command to install. Or, [click here][8] to launch the system-specific installer directly.
|
||||
|
||||
```
|
||||
flatpak install flathub com.github.tchx84.Flatseal
|
||||
```
|
||||
|
||||
### Closing Notes
|
||||
|
||||
I hope the above guide to managing Flatpak permission is easy enough for you to understand and start with Flatpak. It’s super easy to control and far easier to use. Also, you may want to visit our more Flatpak [guide here][9].
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.debugpoint.com/2022/06/manage-flatpak-permission-flatseal/
|
||||
|
||||
作者:[Arindam][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.debugpoint.com/author/admin1/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://www.debugpoint.com/category/distributions
|
||||
[2]: https://www.debugpoint.com/wp-content/uploads/2022/06/Flatseal-App.jpg
|
||||
[3]: https://www.debugpoint.com/wp-content/uploads/2022/06/Manage-Flatpak-Permission-using-Flatseal.jpg
|
||||
[4]: https://www.debugpoint.com/wp-content/uploads/2022/06/Telegram-Desktop-Flatpak-App-does-not-have-permission-to-the-home-folders.jpg
|
||||
[5]: https://www.debugpoint.com/wp-content/uploads/2022/06/Permission-changed-of-Telegram-Desktop-to-give-access-to-folders.jpg
|
||||
[6]: https://flathub.org/apps/details/com.github.tchx84.Flatseal
|
||||
[7]: https://flatpak.org/setup/
|
||||
[8]: https://dl.flathub.org/repo/appstream/com.github.tchx84.Flatseal.flatpakref
|
||||
[9]: https://www.debugpoint.com/tag/flatpak/
|
@ -2,7 +2,7 @@
|
||||
[#]: via: "https://itsfoss.com/love-thy-terminal/"
|
||||
[#]: author: "Ankush Das https://itsfoss.com/author/ankush/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: translator: "duoluoxiaosheng"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
@ -0,0 +1,151 @@
|
||||
[#]: subject: "LibreOffice 7.4: Top New Features and Release Details"
|
||||
[#]: via: "https://www.debugpoint.com/2022/06/libreoffice-7-4/"
|
||||
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
LibreOffice 7.4: Top New Features and Release Details
|
||||
======
|
||||
This post contains the top new features of LibreOffice 7.4 (upcoming) across Writer, Calc, Impress and other core modules.
|
||||
|
||||
**This post contains the top new features of LibreOffice 7.4 (upcoming) across Writer, Calc, Impress and other core modules.**
|
||||
|
||||
The LibreOffice team improves the famous free and open-source office product with each iteration. Perhaps the only stable and well-managed open-source project as a replacement to Microsoft Office.
|
||||
|
||||
The LibreOffice 7.4 version (planned in August), bringing regular updates to core modules including Calc, Writer and Impress with features and enhancements. Furthermore, in this release, the compatibility with Microsoft Office improved with changes to the core filters and platform updates.
|
||||
|
||||
Before we round up the new features, here’s a tentative schedule for LibreOffice 7.4:
|
||||
|
||||
### Schedule
|
||||
|
||||
| Milestone | Release Date |
|
||||
| :- | :- |
|
||||
| Alpha 1 | May 9, 2022 – May 15, 2022 |
|
||||
| Feature Freeze | Jun 6, 2022 – Jun 12, 2022 |
|
||||
| Beta 1 | Jun 6, 2022 – Jun 12, 2022 |
|
||||
| RC1 | Jul 4, 2022 – Jul 10, 2022 |
|
||||
| RC2 | Jul 25, 2022 – Jul 31, 2022 |
|
||||
| RC3 | Aug 8, 2022 – Aug 14, 2022 |
|
||||
| Release 7.4 | Aug 15, 2022 – Aug 21, 2022 |
|
||||
|
||||
### LibreOffice 7.4 Features
|
||||
|
||||
#### Calc
|
||||
|
||||
First and foremost, the most crucial change coming in 7.4 is the support of 16k columns in LibreOffice Calc. It was available in earlier LibreOffice 7.3 but hidden as an experimental option. Finally, it is open to support 16384 columns, i.e. up to XFD. Additional columns are going to help several high-volume data work.
|
||||
|
||||
![LibreOffice 7.4 Calc now supports 16k columns.][1]
|
||||
|
||||
Second, the Autosum button gets the following [additional functions][2] to improve productivity and save time.
|
||||
|
||||
* COUNTA
|
||||
* PRODUCT
|
||||
* STDEV
|
||||
* STDEVP
|
||||
* VAR
|
||||
* VARP
|
||||
|
||||
![Additional options in Autosum button][3]
|
||||
|
||||
Moreover, the height of the formula bar is now part of the *.ods files. Hence, you can see the height retained after saving the file and opening it. Earlier, it was being reset to the default height. It is one of the small changes but has a more significant impact on heavy Calc users.
|
||||
|
||||
![Height of Calc Formula bar][4]
|
||||
|
||||
In addition, a new menu option `Sheet > Navigate > Go to Sheet` shows an entire new dialog which is similar to the Writer’s Go to Page.
|
||||
|
||||
#### Writer
|
||||
|
||||
Firstly, the hyphenation settings get three new options. You can now specify the size of the hyphenation zone, minimum word length and ability to stop hyphenating the last word.
|
||||
|
||||
![New Hyphenation settings][5]
|
||||
|
||||
*Image credit: LibreOffice Team*
|
||||
|
||||
Secondly, the menu item Tools > Update > Update now updates the preview of all OLE objects. Also, if you are importing a DOCX file in LibreOffice 7.4, the paragraph borders bring more clarity. In addition, the import also improves the Rich text and checkbox contents inside the text box for DOCX imports. Moreover, Write 7.4 now supports clearing breaks from Word files improving layout consistency.
|
||||
|
||||
Secondly, the menu item `Tools > Update > Update all` now updates the preview of all OLE objects.
|
||||
|
||||
Also, if you are importing a DOCX file in LibreOffice 7.4, the paragraph borders bring more clarity. In addition, the import also improves the Rich text and checkbox contents inside the text box for DOCX imports.
|
||||
|
||||
Moreover, Writer 7.4 now supports clearing breaks from Word files improving layout consistency.
|
||||
|
||||
#### Impress
|
||||
|
||||
The significant change in Impress is a new Theme tab in the Slide properties for the master slide. It contains several accent colour options which control all the sildes in your presentation. It will be a really neat feature in this version.
|
||||
|
||||
![New Theme option in Slide Master Properties][6]
|
||||
|
||||
### Common Updates (across all modules)
|
||||
|
||||
Firstly, the most important change as a standard feature is LibreOffice now supports WEBP images officially. You can directly export and import WebP images across Writer, Calc, Draw etc. Now you do not need additional software to convert WEBP images, especially in Linux systems.
|
||||
|
||||
Moreover, the support for Windows compressed enhanced meta file (EMZ/WMZ) also lands in this release.
|
||||
|
||||
![New WEBP Image Support][7]
|
||||
|
||||
Secondly, the Fille > Recent Documents can remember the state of the last opened document, whether it was read-only or editable.
|
||||
|
||||
The 3D shapes lighting gets some bug fixes and corrections corresponding to the ODF specifications.
|
||||
|
||||
### Performance Updates
|
||||
|
||||
A bunch of performance boosts also makes this an important release of LibreOffice. Here’s a quick recap of the performance boosts.
|
||||
|
||||
* [The Text Layout performance gets around a 60% boost][8]
|
||||
* [Calc formula re-calculation][9]
|
||||
* Improved performance of [VLOOKUP][10], COUNTIF and SUMIF
|
||||
* [And CSV file import][11]
|
||||
|
||||
That’s not all. LibreOffice 7.4 also brings a huge set of filters (export and import) for Microsoft Office 365 file types, extended PDF export options (such as a sign) via command line, updated language support and API changes.
|
||||
|
||||
### Download LibreOffice 7.4 for Testing
|
||||
|
||||
You can download the development version of LibreOffice 7.4 using the respective links and help to test.
|
||||
|
||||
* [RPM Package for Fedora and related distributions][12]
|
||||
* [DEB packages for Ubuntu, Linux Mint and others][13]
|
||||
* [Windows 10, 11 – 64-bit][14]
|
||||
* [macOS 64 bit][15]
|
||||
* [Mac OS X – ARM and Apple SIlicon, M1][16]
|
||||
|
||||
If you need assistance, you can refer to our [guide here][17] to install the development version in Linux. Make sure to report any issues or bugs in the [official bug tracker.][18]
|
||||
|
||||
LibreOffice 7.4 is planned for release between Aug 15, 2022, and Aug 21, 2022.
|
||||
|
||||
*[Via Release Notes][19]*
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.debugpoint.com/2022/06/libreoffice-7-4/
|
||||
|
||||
作者:[Arindam][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.debugpoint.com/author/admin1/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://www.debugpoint.com/wp-content/uploads/2022/06/LibreOffice-7.4-Calc-now-supports-16k-columns.jpg
|
||||
[2]: https://bugs.documentfoundation.org/show_bug.cgi?id=139602
|
||||
[3]: https://www.debugpoint.com/wp-content/uploads/2022/06/Additional-formula-in-Autosum-tool.jpg
|
||||
[4]: https://www.debugpoint.com/wp-content/uploads/2022/06/Height-of-Calc-Formula-bar.jpg
|
||||
[5]: https://www.debugpoint.com/wp-content/uploads/2022/06/New-Hyphenation-settings.jpg
|
||||
[6]: https://www.debugpoint.com/wp-content/uploads/2022/06/New-Theme-option-in-Slide-Master-Properties.jpg
|
||||
[7]: https://www.debugpoint.com/wp-content/uploads/2022/06/New-WEBP-Image-Support.jpg
|
||||
[8]: http://llunak.blogspot.com/2022/04/improving-text-layout-performance.html
|
||||
[9]: https://bugs.documentfoundation.org/show_bug.cgi?id=119083
|
||||
[10]: https://bugs.documentfoundation.org/show_bug.cgi?id=146546
|
||||
[11]: https://bugs.documentfoundation.org/show_bug.cgi?id=94677
|
||||
[12]: https://www.libreoffice.org/download/download/?type=rpm-x86_64&version=7.4.0&lang=en-US
|
||||
[13]: https://www.libreoffice.org/download/download/?type=deb-x86_64&version=7.4.0&lang=en-US
|
||||
[14]: https://www.libreoffice.org/download/download/?type=win-x86_64&version=7.4.0&lang=en-US
|
||||
[15]: https://www.libreoffice.org/download/download/?type=mac-x86_64&version=7.4.0&lang=en-US
|
||||
[16]: https://www.libreoffice.org/download/download/?type=mac-aarch64&version=7.4.0&lang=en-US
|
||||
[17]: https://www.debugpoint.com/2022/06/install-latest-libreoffice-ubuntu-linux/
|
||||
[18]: https://bugs.documentfoundation.org/
|
||||
[19]: https://wiki.documentfoundation.org/ReleaseNotes/7.4
|
@ -0,0 +1,159 @@
|
||||
[#]: subject: "A Quick Look at Cloud Cost Management Tools"
|
||||
[#]: via: "https://www.opensourceforu.com/2022/06/a-quick-look-at-cloud-cost-management-tools/"
|
||||
[#]: author: "Dr Anand Nayyar https://www.opensourceforu.com/author/anand-nayyar/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
A Quick Look at Cloud Cost Management Tools
|
||||
======
|
||||
Whether you are using a single cloud computing service provider or operating in a multi-cloud or hybrid cloud computing environment, you may be paying for resources that your organisation does not use at all. That is why cloud cost management is so important.
|
||||
|
||||
![Cloud cost management tools][1]
|
||||
|
||||
If you are a developer or software engineer, you will be using a range of cloud resources. Managing cloud costs, and knowing exactly where and why the expenditure on the cloud is happening is a huge challenge. If cloud-native technologies like microservices, containers and Kubernetes are being used, cloud utilisation may not be fully visible and the organisation may end up paying for far more services than have been used.
|
||||
|
||||
![Figure 1: Cost per customer report][2]
|
||||
|
||||
### What is cloud cost management?
|
||||
|
||||
Cloud cost management is defined as the efficient monitoring, measuring and control of cloud costs. Traditionally, cloud cost management focused on cutting down cloud cost wastages in terms of under-utilised and forgotten resources but, nowadays, it focuses on architectural optimisation.
|
||||
|
||||
The advantages of cloud cost management are:
|
||||
|
||||
* High accuracy in the planning, budgeting and forecasting of cloud services
|
||||
* Re-architecting resources for more profit
|
||||
* Reducing operational costs and decommissioning wasteful services
|
||||
* Effective load balancing management and better usage of computing resources
|
||||
|
||||
Cloud native cost management services
|
||||
|
||||
AWS Cloud Economics Center
|
||||
Though the key driver for any enterprise to migrate to a cloud platform is better total cost of ownership (TCO), the benefits don’t stop there today. Cloud economics or FinOps is the term used for creating a framework that can help to derive the expenditure in cloud adoption.
|
||||
|
||||
![Figure 2: Amazon cost management solutions][3]
|
||||
|
||||
When a business is growing, good planning, budget control and predicting the pattern of cloud asset usage are important. Cloud economics addresses this space. There are many third party tools like CloudHealth, Densify or Apptio Cloudability available as cost management tools, which come with financial management, advisory and advanced analytics. Most of these tools work on any cloud platform — Azure, AWS or GCP.
|
||||
|
||||
At the same time, there are native tools available as well for cost management like the AWS Economics Center or Cost Management console.
|
||||
|
||||
AWS Economics is based on a cloud value framework and has the following benefits.
|
||||
|
||||
* Cost savings: Offers usage details on the cloud assets and TCO calculation to compare with existing and forecasted spends.
|
||||
* Staff productivity: Improved automation tasks like DevOps pipeline, automated code review, and automated cost optimisation alerts reduce manual efforts.
|
||||
* Operational resilience: A well-architected framework is used to ensure high availability, security and compliance, leading to highly resilient cloud platform usage.
|
||||
* Business agility: Reduces errors in cloud deployment by using best practices and AWS partner solutions.
|
||||
|
||||
![Figure 3: AWS cost management dashboard][4]
|
||||
|
||||
### Azure cloud cost management
|
||||
|
||||
A well-architected framework has five pillars of cloud architecture development — cost optimisation, performance efficiency, operational excellence, reliability and security. Of these, cost optimisation will give immediate to long-term benefits, and requires a cost adoption framework and operating model to build an efficient cost pillar.
|
||||
|
||||
Cloud cost management includes cost transparency and cost governance as per the FinOps framework guidance. This can be implemented by using the Crawl-Walk-Run principle, where we start with cost transparency and the operating model (crawl), move towards cost optimisation and automation (walk) and, finally, implement cost management solutions and governance policies for efficient cost optimisation (run).
|
||||
|
||||
The Azure platform calls this the Build-Measure-Learn principle (similar to the Crawl-Walk-Run principle). It suggests reviewing the cost principles, including right-sizing of resources and resource tagging, and then developing a cost model to decide the billing models for resources. These will capture cost requirements, policies for infrastructure provisioning and associated budget allocation. Cost alerts and budget thresholds should also be set.
|
||||
|
||||
Resources should be tagged so that priorities can be set in cost allocation for production and non-production environments, to create a workflow process in budget management.
|
||||
|
||||
![Figure 4: AWS Trusted Advisor][5]
|
||||
|
||||
### Google cost visibility services
|
||||
|
||||
The Google Cloud Platform or GCP cost management suite is built on three tools.
|
||||
|
||||
* Cost visibility: Provides the cost per resource.
|
||||
|
||||
* Resource usage optimisation: The cost advisory facility helps you to tune the cost per resource by giving the history of and the prediction for cloud service usage.
|
||||
|
||||
* Pricing efficiency: Advisory guidelines are given to optimise the cloud services, like use of cost-efficient compute or storage resources based on usage patterns.
|
||||
|
||||
![Figure 5: Azure guidance principles for cost optimisation (Image source: Azure documentation)][6]
|
||||
|
||||
Cost management tools provide dashboard visualisation of resource usage. Alerts are given with respect to over usage or under usage of services, and a usage summary can be scheduled (weekly, monthly or quarterly). Billing exports to CSV or JSON files can be used for historical analysis.
|
||||
|
||||
Google Cloud Platform (GCP) also has many native cloud services for cloud billing; it has reporting, forecasting and optimisation features for compute and storage services, some of which are listed below.
|
||||
|
||||
* Cost management provides visualisation reports on service utilisation, filtered by labels. Data Studio can be used to build custom dashboards.
|
||||
* Billing APIs and data collection APIs (StackDriver, Resource Manager API) offer integration with native and third party cost management tools.
|
||||
* Google Recommender can be used for optimising cost and usage, based on patterns of resource usage. Resource hierarchy can be used for fine grained resource management for cost allocation.
|
||||
* Quota limits can be used to proactively control the spend rate on resources including apps and infrastructure.
|
||||
* Budgets and alerts can throttle cap costs to control spends. These can be used to closely monitor costs, and send alerts through an SMS or e-mail using programmatic budget notifications.
|
||||
* GCP can be integrated with ‘Cloud Build’, ‘Cloud Pub/Sub’ (event/alerts) and cloud functions for cost reporting, billing and notifications.
|
||||
|
||||
![Figure 6: GCP cost summary dashboard (Image source: Google documentation)][7]
|
||||
|
||||
### Some best practices to handle cloud costs efficiently
|
||||
|
||||
Cost management and cost transparency are the two common principles of cloud governance. The FinOps framework addresses both these principles.
|
||||
|
||||
The top seven ways to optimise cloud cost usage are listed below.
|
||||
|
||||
* Shutdown unused resources/instances: A common issue in resource optimisation is handling unused resources or instances, particularly in non-production environments. Monitoring and controlling these will enable better cost optimisation.
|
||||
* Right-size underused resources: During cloud migration, infrastructure sizing is done based on the existing on-premises infrastructure. We may not know the performance requirements (completely) at the initial stage, and hence right-sizing resources like VM instances, storage services and database size can help reduce costs.
|
||||
* Reserve instances or spot instances for consistent long-term workloads: When moving to the cloud, we generally have a clear idea of what we need for long-term usage like data lakes or FTP landing zone. For these services, using reserved or spot instances for three to five years can give as much as 50 per cent cost benefit.
|
||||
* Choose the hybrid cloud approach for reducing migration costs: Instead of moving all applications at once to the cloud, we can migrate in stages, keeping some key applications on-premises.
|
||||
* Use auto-scaling features for the required resources: Many cloud services have the auto-scale feature, which helps to scale-up computing and storage when there is higher usage and scale these down in case of lower usage. This feature too helps to reduce costs.
|
||||
Budget your resources: We can set a quota for resources using a budget and cost allocation, so that if there is dynamic burst in resource requirement it can be controlled well within the allocated budget by enabling alerts and notifications.
|
||||
* Choose the right compute services for better performance and costs: Though cloud service providers like Azure, AWS and GCP have multiple compute models and instance types, we may not know if we are using the right compute size and model. If we can optimise the compute model considering performance and technical requirements, we can manage costs better.
|
||||
|
||||
### Open source cloud cost management tools
|
||||
|
||||
#### Kube-Downscaler
|
||||
|
||||
Kube-Downscaler is an open source framework written in Python, which can be used to handle automatic shutdowns or set the uptime for Kubernetes worker pods based on usage patterns (for example, shutdown during the weekend and set uptime during office hours).
|
||||
|
||||
This framework runs on a single pod in the Kubernetes cluster and can work with Azure (AKS), AWS (EKS) and GCP (GKE). It has a configuration setup that can be given for the shutdown time period or uptime running period. It can be scheduled to run once or regularly for a given period (monthly, yearly).
|
||||
|
||||
![Figure 7: Integrated FinOps toolchain ecosystem][8]
|
||||
|
||||
Alternatively, we can use Kubernetes-Ops, which is another open source framework for handling end-to-end Kubernetes clusters. It can create pods/clusters, and manage, deploy, scale and monitor them in a single pane of glass.
|
||||
|
||||
#### Kubecost
|
||||
|
||||
Though cloud cost governance aims at managing compute and storage services to a large extent, managing container costs is also a challenging exercise.
|
||||
|
||||
Kubecost helps to get monthly spends, costs for name space level, and deployment resource costs; it identifies cost efficiency in a Kubernetes clustered environment. It comes in both a free-to-use open source model (where there are limitations to using it such as a single cluster, metric retention period) and a commercial model.
|
||||
|
||||
We can get details of underutilised or over-provisioned resources (nodes and pods, and abandoned resources) based on usage footprints. The major features of Kubecost are cost allocation across nodes and pods, unified cost monitoring with integrated dashboard, cost optimisation insights to identify under-provisioned or over-provisioned cluster resources, and cost alerts as well as notifications for anomalous behaviour in resource usage.
|
||||
|
||||
Kubecost can be used with Azure Kubernetes Service (AKS), Amazon’s Elastic Kubernetes Service (EKS) and Fargate, Google Kubernetes Engine (GKE) and other Kubernetes platforms in private cloud environments.
|
||||
|
||||
### Integrated FinOps toolchain solution
|
||||
|
||||
FinOps is more of a culture adoption and is driven by the three-dimensional approach for cloud cost management — people (cost administration, team structure, training), processes (cost levers, maturity models, metrics definitions) and tools (cost management services, third party tools, cost advisory services).
|
||||
|
||||
FinOps is a collaborative activity between the finance/procurement team, technical IT operations team, and business management (COO, CIO). It can be developed as an agnostic framework for implementation in a multi-cloud environment (public/private/hybrid). It can also be easily integrated with third party tools for flexible implementation. For example, developing reports and dashboards could be made flexible with this integration of third-party tools.
|
||||
|
||||
![Figure 8: Kubecost dashboard (Image source: Azure documentation)][9]
|
||||
|
||||
### Future trends in FinOps adoption
|
||||
|
||||
The adoption of FinOps is maturing in most organisations that have substantial cloud consumption as they need processes and procedures to manage, monitor, allocate and forecast cloud spending. With the introduction of FinOps, organisations will have deeper insights into the resources available or reserved, which will promote appropriate procurement of cloud resources and avoid unnecessary spend in the first place.
|
||||
|
||||
Choosing between the right FinOps platform from cloud services providers (Azure Cost Management, AWS Cost Explorer and GCP Cost Tools), third party options or in-house development is not an easy task. Factors like variability in size and usage of cloud resources, fast-changing technology, and the advent of new cloud use cases complicate the process of automating cost optimisation. Building a governance culture and mindset is vital, but not always easy.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.opensourceforu.com/2022/06/a-quick-look-at-cloud-cost-management-tools/
|
||||
|
||||
作者:[Dr Anand Nayyar][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.opensourceforu.com/author/anand-nayyar/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Cloud-cost-management-tools.jpg
|
||||
[2]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Fig1-CloudZero.jpg
|
||||
[3]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-2.jpg
|
||||
[4]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figuer-3.jpg
|
||||
[5]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-4.jpg
|
||||
[6]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-5.jpg
|
||||
[7]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-6.jpg
|
||||
[8]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-7.jpg
|
||||
[9]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-8.jpg
|
221
sources/tech/20220613 Use Terraform to manage TrueNAS.md
Normal file
221
sources/tech/20220613 Use Terraform to manage TrueNAS.md
Normal file
@ -0,0 +1,221 @@
|
||||
[#]: subject: "Use Terraform to manage TrueNAS"
|
||||
[#]: via: "https://opensource.com/article/22/6/terraform-truenas"
|
||||
[#]: author: "Alan Formy-Duval https://opensource.com/users/alanfdoss"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Use Terraform to manage TrueNAS
|
||||
======
|
||||
Get more out of TrueNAS when you integrate Terraform for configuration management.
|
||||
|
||||
![Puzzle pieces coming together to form a computer screen][1]
|
||||
|
||||
Image by: Opensource.com
|
||||
|
||||
Sometimes combining different open source projects can have benefits. The synergy of using Terraform with TrueNAS is a perfect example.
|
||||
|
||||
TrueNAS is an OpenBSD-based operating system that provides network-attached storage (NAS) and network services. One of its main strengths is leveraging the ZFS file system, which is known for enterprise-level reliability and fault tolerance. Terraform is a provisioning and deployment tool embodying the concept of infrastructure as code.
|
||||
|
||||
### TrueNAS
|
||||
|
||||
TrueNAS has a very nice web user interface (UI) for its management and an application programming interface (API). Terraform can be integrated with the API to provide configuration management of your NAS, as I'll demonstrate below.
|
||||
|
||||
To begin, I used Virtual Machine Manager to configure a virtual machine and then installed the latest version, TrueNAS 13.0. The only necessary input was to enter the root password. Once it reboots, the main menu appears. You will also see the HTTP management address. You can access this address from your local web browser.
|
||||
|
||||
![Virtual machine console setup][2]
|
||||
|
||||
### Terraform
|
||||
|
||||
Terraform needs to be installed where it can access the TrueNAS management URL. I am taking advantage of tfenv, a tool for managing Terraform versions.
|
||||
|
||||
```
|
||||
$ tfenv list-remote
|
||||
$ tfenv install 1.2.0
|
||||
$ tfenv use 1.2.0
|
||||
$ terraform -version
|
||||
Terraform v1.2.0
|
||||
on linux_amd64
|
||||
```
|
||||
|
||||
Next, create a working directory, such as `~/code/terraform/truenas`, to contain the configuration files associated with your TrueNAS instance.
|
||||
|
||||
```
|
||||
$ mkdir ~/code/terraform/truenas
|
||||
$ cd ~/code/terraform/truenas
|
||||
```
|
||||
|
||||
Create the initial terraform configuration file and add the necessary directives to define the TrueNAS provider.
|
||||
|
||||
```
|
||||
$ vi main.tf
|
||||
```
|
||||
|
||||
The provider will look like this, where the address and API key for your TrueNAS instance will need to be correctly specified.
|
||||
|
||||
```
|
||||
$ cat main.tf
|
||||
|
||||
|
||||
terraform {
|
||||
required_providers {
|
||||
truenas = {
|
||||
source = "dariusbakunas/truenas"
|
||||
version = "0.9.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
provider "truenas" {
|
||||
api_key = "1-61pQpp3WyfYwg4dHToTHcOt7QQzVrMtZnkJAe9mmA0Z2w5MJsDB7Bng5ofZ3bbyn"
|
||||
base_url = "http://192.168.122.139/api/v2.0"
|
||||
}
|
||||
```
|
||||
|
||||
The TrueNAS API key is created in the Web UI. Log in and click the small gear in the upper right-hand corner.
|
||||
|
||||
![A pulldown menu from settings shows options including the desired choice, API Keys][3]
|
||||
|
||||
This UI section enables you to create the API key. Once generated, copy it to the `main.tf` file.
|
||||
|
||||
### Initialize
|
||||
|
||||
In your TrueNAS Terraform directory, you have the `main.tf` file. The first step is to initialize using the command `terraform init`, which should generate the following result:
|
||||
|
||||
```
|
||||
Initializing the backend...
|
||||
|
||||
Initializing provider plugins...
|
||||
- Finding dariusbakunas/truenas versions matching "0.9.0"...
|
||||
- Installing dariusbakunas/truenas v0.9.0...
|
||||
- Installed dariusbakunas/truenas v0.9.0 (self-signed, key ID E44AF1CA58555E96)
|
||||
|
||||
Partner and community providers are signed by their developers.
|
||||
If you'd like to know more about provider signing, you can read about it here:
|
||||
https://www.terraform.io/docs/cli/plugins/signing.html
|
||||
|
||||
Terraform has created a lock file .terraform.lock.hcl to record the provider
|
||||
selections it made above. Include this file in your version control repository
|
||||
so that Terraform can guarantee to make the same selections by default when
|
||||
you run "terraform init" in the future.
|
||||
|
||||
Terraform has been successfully initialized!
|
||||
|
||||
You may now begin working with Terraform. Try running "terraform plan" to see
|
||||
any changes that are required for your infrastructure. All Terraform commands
|
||||
should now work.
|
||||
|
||||
If you ever set or change modules or backend configuration for Terraform,
|
||||
rerun this command to reinitialize your working directory. If you forget, other commands will detect it and remind you to do so if necessary.
|
||||
```
|
||||
|
||||
A successful initialization means you're ready to start adding resources. Any TrueNAS item, such as a storage pool, network file system (NFS) share, or cron job, is a resource.
|
||||
|
||||
### Add a ZFS dataset
|
||||
|
||||
The following example resource directive defines a ZFS dataset. For my example, I will add it to the `main.tf` file.
|
||||
|
||||
```
|
||||
resource "truenas_dataset" "pictures" {
|
||||
pool = "storage-pool"
|
||||
name = "pictures"
|
||||
comments = "Terraform created dataset for Pictures"
|
||||
}
|
||||
```
|
||||
|
||||
Run the command `terraform validate` to check the configuration.
|
||||
|
||||
```
|
||||
Success! The configuration is valid.
|
||||
```
|
||||
|
||||
Running `terraform plan` will describe the actions that Terraform will perform. Now, add the new dataset with `terraform apply`.
|
||||
|
||||
```
|
||||
Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
|
||||
+ create
|
||||
|
||||
Terraform will perform the following actions:
|
||||
|
||||
# truenas_dataset.pictures will be created
|
||||
+ resource "truenas_dataset" "pictures" {
|
||||
+ acl_mode = (known after apply)
|
||||
+ acl_type = (known after apply)
|
||||
+ atime = (known after apply)
|
||||
+ case_sensitivity = (known after apply)
|
||||
+ comments = "Terraform created dataset for Pictures"
|
||||
+ compression = (known after apply)
|
||||
+ copies = (known after apply)
|
||||
+ dataset_id = (known after apply)
|
||||
+ deduplication = (known after apply)
|
||||
+ encrypted = (known after apply)
|
||||
+ encryption_algorithm = (known after apply)
|
||||
+ encryption_key = (sensitive value)
|
||||
+ exec = (known after apply)
|
||||
+ generate_key = (known after apply)
|
||||
+ id = (known after apply)
|
||||
+ managed_by = (known after apply)
|
||||
+ mount_point = (known after apply)
|
||||
+ name = "pictures"
|
||||
+ pbkdf2iters = (known after apply)
|
||||
+ pool = "storage-pool"
|
||||
+ quota_bytes = (known after apply)
|
||||
+ quota_critical = (known after apply)
|
||||
+ quota_warning = (known after apply)
|
||||
+ readonly = (known after apply)
|
||||
+ record_size = (known after apply)
|
||||
+ ref_quota_bytes = (known after apply)
|
||||
+ ref_quota_critical = (known after apply)
|
||||
+ ref_quota_warning = (known after apply)
|
||||
+ share_type = (known after apply)
|
||||
+ snap_dir = (known after apply)
|
||||
+ sync = (known after apply)
|
||||
}
|
||||
|
||||
Plan: 1 to add, 0 to change, 0 to destroy.
|
||||
|
||||
Do you want to perform these actions?
|
||||
Terraform will perform the actions described above.
|
||||
Only 'yes' will be accepted to approve.
|
||||
|
||||
Enter a value:
|
||||
```
|
||||
|
||||
Type `yes` to confirm and hit Enter.
|
||||
|
||||
```
|
||||
truenas_dataset.pictures: Creating...
|
||||
truenas_dataset.pictures: Creation complete after 0s [id=storage-pool/pictures]
|
||||
|
||||
Apply complete! Resources: 1 added, 0 changed, 0 destroyed.
|
||||
```
|
||||
|
||||
That's it. You can check for this new dataset in the TrueNAS Web UI.
|
||||
|
||||
![The pictures dataset is shown in the storage pool list, with the comment "Terraform create dataset for pictures"][4]
|
||||
|
||||
### Do more with TrueNAS and Terraform
|
||||
|
||||
The TrueNAS provider for Terraform allows you to manage many more aspects of your TrueNAS device. For instance, you could share this new dataset as an NFS or server message block (SMB) share. You can also create additional datasets, cron jobs, and zvols.
|
||||
|
||||
Image by: (Alan Formy-Duval, CC BY-SA 4.0)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/6/terraform-truenas
|
||||
|
||||
作者:[Alan Formy-Duval][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/alanfdoss
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://opensource.com/sites/default/files/lead-images/puzzle_computer_solve_fix_tool.png
|
||||
[2]: https://opensource.com/sites/default/files/2022-06/TrueNAS_console.png
|
||||
[3]: https://opensource.com/sites/default/files/2022-06/TrueNAS_APIkey.png
|
||||
[4]: https://opensource.com/sites/default/files/2022-06/TrueNAS_Dataset.png
|
@ -0,0 +1,141 @@
|
||||
[#]: subject: "Build a Smart Parking System for a Metro Station"
|
||||
[#]: via: "https://www.opensourceforu.com/2022/06/build-a-smart-parking-system-for-a-metro-station/"
|
||||
[#]: author: "Dr Maheswari R. https://www.opensourceforu.com/author/dr-maheswari-r/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Build a Smart Parking System for a Metro Station
|
||||
======
|
||||
This article will help you design a Web based application that automates a smart parking system for cars in a metro station using Node-RED.
|
||||
|
||||
![Smart car parking][1]
|
||||
|
||||
A Web application is software that gets executed on a Web server. Every Web application is accessed by the end user through a Web browser. These Web applications are programmed using a client-server architecture, where the user (client) is provided services through a remotely located server that might be hosted by a third-party. A Web API (application programming interface) is available across the Web and can be accessed by the user using the HTTP protocol, as shown in Figure 1.
|
||||
|
||||
This article will demonstrate how to design a Web based application for an automated smart parking system for cars in a metro station. It is designed using open source Node-RED. This system creates an interactive and stylish user login form using a template node, where HTML and CSS are coded to get car owner details to automate the parking system. We can see the login and submission form flow diagrams in Figures 2 and 3.
|
||||
|
||||
The nodes used are as follows:
|
||||
|
||||
**[Metro smart parking node flow design][2]**
|
||||
Node-RED is triggered using the command ‘node-red’. Through the URL *http://127.0.0.1:1880/*, the node-RED UI flow browser is enabled. We have considered that the Node-RED setup is done and working.
|
||||
|
||||
![table function][3]
|
||||
|
||||
![Figure 1: Web API][4]
|
||||
|
||||
Follow the steps given below to create the login and submission forms.
|
||||
|
||||
![Figure 2: Login form flow diagram][5]
|
||||
|
||||
![Figure 3: Submission form flow diagram][6]
|
||||
|
||||
*Login form*
|
||||
1) From the node palette, drag and drop http in node, which creates an HTTP end point for creating Web services.
|
||||
2) Connect http in node to function node. The latter helps to code JavaScript functions to run against the messages being received by the node.
|
||||
|
||||
![Figure 4: Login form for smart parking for cars][7]
|
||||
|
||||
3) Connect function node to template node, where the latter creates a Web API based on the provided template.
|
||||
4) Connect template node to http response node; the latter sends responses back to requests received from an http input node.
|
||||
|
||||
![Figure 5: Submission form for smart parking for cars][8]
|
||||
|
||||
**Submission form**
|
||||
1) Drag and drop http in node and connect it to json node, which converts and communicates the data as JSON string.
|
||||
2) Connect http in node to debug node, which gives output in a debug monitor.
|
||||
3) Place and connect json node to function node and connect the latter to http response node.
|
||||
|
||||
After the creation of a complete flow, click on the Deploy button in the top right corner of the Node-RED window. To view the user interface, go to the link*127.0.0.1:1880/ui/.*
|
||||
Once you enter and then click Submit, it will take you to the next page where you can read all the news articles.
|
||||
|
||||
**Node-RED workflow**
|
||||
In a single flow of Node-RED, you can create both the login form and submission form, as shown in Figures 4 and 5.
|
||||
|
||||
Now we will configure the Node properties.
|
||||
|
||||
*Login form:* Edit the http in property by choosing the method ‘Get’ and set the URL to ‘/MetroStation’ and configure the name as ‘Smart Parking’.
|
||||
|
||||
![Figure 6: Http in node property configurations][9]
|
||||
|
||||
| - |
|
||||
| :- |
|
||||
| Note: The URL can be any user defined local variable. |
|
||||
|
||||
Now select the function node and edit its properties by coding the ‘msg.url = project’ and configure the name field with ‘Project Submission’.
|
||||
|
||||
![Figure 7: Function node property configurations][10]
|
||||
|
||||
In the Property window of the template node, configure the appropriate HTML code required for the login form and specify the name as ‘Display panel’. The Mustache template format is being used in this flow. Mustache is a simple Web template system that is described as a logicless template engine. It does not have any explicit control flow statements, such as ‘if’ and ‘else’ conditionals or ‘for’ loops. Looping and conditional evaluation can be achieved using section tags processing lists and lambdas.
|
||||
|
||||
![Figure 8: Template node property configurations][11]
|
||||
|
||||
Configure the edit property of http response node with the name ‘Smart Parking’ (Figure 9).
|
||||
|
||||
![Figure 9: Http response node property configurations][12]
|
||||
|
||||
*Submission form:*In the edit property window of http in node, choose the method ‘POST’ and the URL ‘/project’.
|
||||
|
||||
![Figure 10: Http in node property configurations][13]
|
||||
|
||||
In the JSON node edit window, set *Action* as ‘Convert between JSON String & Object’. Refer to Figure 11.
|
||||
|
||||
![Figure 11: JSON node property configurations][14]
|
||||
|
||||
The function node is configured as specified in Figure 12.
|
||||
|
||||
![Figure 12: Function node property configurations][15]
|
||||
|
||||
In http response node, edit the property name as ‘Project Submitted’.
|
||||
|
||||
![Figure 13: Http response node property configurations][16]
|
||||
|
||||
| - |
|
||||
| :- |
|
||||
| Note: Also add the comment node with comments as ‘Login Form’ and ‘Submission Form’ |
|
||||
|
||||
![Figure 14: Debug node property configurations][17]
|
||||
|
||||
**Dashboard UI Web page**
|
||||
When the user clicks on Submit, the data given will be displayed in the UI and the debug node. If Reset is clicked, the details will be cleared, allowing the user to enter new details (Figure 15).
|
||||
|
||||
![Figure 15: User login UI][18]
|
||||
|
||||
Metro parking rates are provided through a hyperlink, and the tariff output is displayed in the UI. So the smart parking for cars is automated with appropriate hyperlinks to exhibit the parking tariff at the metro station. The final outputs of this automated system are retrieved and displayed in the Node-RED dashboard UI and debug monitor.
|
||||
|
||||
![Figure 16: Metro parking tariff][19]
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.opensourceforu.com/2022/06/build-a-smart-parking-system-for-a-metro-station/
|
||||
|
||||
作者:[Dr Maheswari R.][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.opensourceforu.com/author/dr-maheswari-r/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Smart-car-parking.jpg
|
||||
[2]: https://www.opensourceforu.com/wp-content/uploads/2022/04/table-function-node-red.jpg
|
||||
[3]: https://www.opensourceforu.com/wp-content/uploads/2022/04/table-function-node-red.jpg
|
||||
[4]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-1-Web-Application-Programming-Interface300.jpg
|
||||
[5]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-2-Login-Form-Flow-Diagram300.jpg
|
||||
[6]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-3-Submission-Form-Flow-Diagram300.jpg
|
||||
[7]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-4-Login-Form-of-Metro-Smart-Car-Parking300.jpg
|
||||
[8]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-5-Submission-Form-of-Metro-Smart-Car-Parking300.jpg
|
||||
[9]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-6-Http-in-Node-Property-Configurations300.jpg
|
||||
[10]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-7-Function-Node-Property-Configurations300.jpg
|
||||
[11]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-8-Template-Node-Property-Configurations300.jpg
|
||||
[12]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-9-Template-Node-Property-Configurations300.jpg
|
||||
[13]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-10-Http-in-Node-Property-Configurations300.jpg
|
||||
[14]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-11-Json-Node-Property-Configurations300.jpg
|
||||
[15]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-12-Function-Node-Property-Configurations300.jpg
|
||||
[16]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-13-Http-Response-Node-Property-Configurations300.jpg
|
||||
[17]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-14-Debug-Node-Property-Configurations300.jpg
|
||||
[18]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-15-User-Login-UI300.jpg
|
||||
[19]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-16-Parking-Tariff-Metro300.jpg
|
@ -0,0 +1,84 @@
|
||||
[#]: subject: "Building the metaverse with open source"
|
||||
[#]: via: "https://opensource.com/article/22/6/open-source-metaverse"
|
||||
[#]: author: "Liv Erickson https://opensource.com/users/liverickson"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Building the metaverse with open source
|
||||
======
|
||||
Ensuring that virtual worlds are open, accessible, and safe to all is paramount to a successful metaverse.
|
||||
|
||||
![Why and how to handle exceptions in Python Flask][1]
|
||||
|
||||
Image by: Image from Unsplash.com, Creative Commons Zero
|
||||
|
||||
The word metaverse has been thrown around a lot these days. Whether you believe it's a reality or not, the adoption of the term has signaled a significant shift in the way people think about the future of online interactions. With today's technological advancements and an increase in geographically distributed social circles, the idea of seamlessly connected virtual worlds as part of a metaverse has never felt more appealing.
|
||||
|
||||
Virtual worlds enable a wide range of scenarios, and brings to life a rich and vibrant array of experiences. Students can explore the past by stepping inside a past time period, embodying historic figures, and interacting with buildings that were built centuries ago. [Coworkers][2] can gather for coffee chats, regardless of where in the world they're working. Musicians and artists can interact with fans from around the world in small or large digital venues. Conferences can reach new audiences, and friends can connect to explore interactive spaces.
|
||||
|
||||
When we built virtual world platforms (the predecessors to today's metaverse applications) in the past, there was only limited access to powerful graphics hardware, scalable servers, and high-bandwidth network infrastructure. However, recent advancements in cloud computing and hardware optimization have allowed virtual worlds to reach new audiences. The complexity of what we're able to simulate has increased significantly.
|
||||
|
||||
Today, there are several companies investing in new online virtual worlds and technologies. To me, this is indicative of a fundamental shift in the way people interact with one another, create, and consume content online.
|
||||
|
||||
Some tenets associated with the concept of the metaverse and virtual worlds are familiar through the traditional web, including identity systems, communication protocols, social networks, and online economies. Other elements, though, are newer. The metaverse is already starting to see a proliferation of 3D environments (often created and shared by users), the use of digital bodies, or "avatars", and the incorporation of virtual and augmented reality technology.
|
||||
|
||||
### Building virtual worlds the open source way
|
||||
|
||||
With this shift in computing paradigms, there's an opportunity to drive forward open standards and projects encouraging the development of decentralized, distributed, and interoperable virtual worlds. This can begin at the hardware level with projects like Razer's [Open source virtual reality (OSVR)][3] schematics encouraging experimentation for headset development, and go all the way up the stack. At the device layer, the Khronos Group's [OpenXR][4] standard has been widely adopted by headset manufacturers, which allows applications and engines to target a single API, with device-specific capabilities supported through extensions.
|
||||
|
||||
This allows creators and developers of virtual worlds to focus on mechanics and content. While the techniques used to build 3D experiences aren't new, the increased interest in metaverse applications has resulted in new tools and engines for creating immersive experiences. Although there are many libraries and engines that have differences in how they run their virtual worlds, most virtual worlds share the same underlying development concepts.
|
||||
|
||||
At the core of a virtual world is the 3D graphics and simulation engine (such as [Babylon.js][5] and the WebGL libraries it interacts with). This code is responsible for managing the game state of the world, so that interactions manipulating the state of the world are shared between the visitors of the space, and drawing updates to the environment on screen. Game simulation states can include objects in the world and avatar movement, so that when one user moves through a space, everyone else sees it happening in real time. The rendering engine uses the perspective of a virtual camera to draw a 2D image on the screen, mapped to what a user is looking at in digital space.
|
||||
|
||||
The video game world is made up of 2D and 3D objects that represent a virtual location. These experiences can vary, ranging from small rooms to entire planets, limited only by the creator's imagination. Inside of the virtual world, objects have *transforms* that instantiate the object to a particular place in the world's 3D coordinate system. The transform represents the object's position, rotation, and scale within the digital environment. These objects, which can have mesh geometry created in a 3D modeling program, materials, and textures assigned to them, can trigger other events in the world, play sounds, or interact with the user.
|
||||
|
||||
Once a virtual world has been created, the application renders content to the screen using a virtual camera. Like a camera in the real world, a camera inside of a game engine has a viewport and settings that change the way a frame is captured. For immersive experiences, the camera draws many updates every second (up to 120 frames per second for some high-end virtual reality headsets) to reflect the way you're moving within the space. Virtual reality experiences specifically also require that the camera draws twice: once for each eye, slightly offset by your *interpupillary distance* (the distance between the center of your pupils in each eye).
|
||||
|
||||
If camera rendering components of developing a virtual world sound complex, don't fret. Most libraries and frameworks for authoring immersive content have these capabilities available so you can focus on the content and interactivity. Open source game engines, such as [Open 3D Engine (O3de)][6] and [Godot Engine][7] offer these rendering capabilities and many other tools as built-in features. With open source engines, developers have the additional flexibility of extending or changing core systems, which allows for more control over the end experience.
|
||||
|
||||
Other key characteristics that make up the metaverse include users taking on digital bodies (often referred to as *avatars*), user-generated content that's created and shared by users of the platform, voice and text chat, and the ability to navigate between differently themed worlds and rooms.
|
||||
|
||||
### Approaches to building the metaverse
|
||||
|
||||
Before choosing a development environment for building the metaverse, you should consider what tenets are most critical for the types of experiences and worlds your users are going to experience. The first choice you're faced with is whether to target a native experience or the browser. Both have different considerations for how a virtual world unfolds.
|
||||
|
||||
A proprietary metaverse necessarily offers limited connections to virtual worlds. Open source and browser-based platforms have emerged, building on top of web standards and operating through the [Khronos group and][8][W3C][9] to ensure interoperability and content portability.
|
||||
|
||||
Web applications such as [Mozilla Hubs][10] and Element's [Third Room][11] build on existing web protocols to create open source options for building browser-based virtual world applications. These experiences, linking together 3D spaces embedded into web pages, utilize open source technologies including [three.js][12], [Babylon.js][13], and [A-Frame][14] for content authoring. They also utilize open source realtime communication protocols for voice and synchronized avatar movement.
|
||||
|
||||
### Open access
|
||||
|
||||
As with all emerging technologies, it's critical to consider the use case and impact to the humans who use it. Immersive virtual and augmented reality devices have unprecedented capabilities to capture, process, store, and utilize data about an individual, including their physical movement patterns, cognitive state, and attention. Additionally, virtual worlds themselves significantly amplify the benefits and problems of today's social media, and require careful implementation of trust and safety systems, moderation techniques, and appropriate access permissions to ensure that users have a positive experience when they venture into these spaces.
|
||||
|
||||
As the web evolves and encompasses immersive content and spatial computing devices, it's important to think critically and carefully about the experiences being created, and interoperability across different applications. Ensuring that these virtual worlds are open, accessible, and safe to all is paramount. The prospect of the metaverse is an exciting one, and one that can only be realized through collaborative open source software movements.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/6/open-source-metaverse
|
||||
|
||||
作者:[Liv Erickson][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/liverickson
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://opensource.com/sites/default/files/lead-images/computer_code_programming_laptop.jpg
|
||||
[2]: https://enterprisersproject.com/article/2022/2/4-metaverse-tools-workplace-collaboration
|
||||
[3]: https://www2.razer.com/osvr
|
||||
[4]: https://www.khronos.org/OpenXR/
|
||||
[5]: https://www.babylonjs.com/community/
|
||||
[6]: https://www.o3de.org/
|
||||
[7]: https://godotengine.org/
|
||||
[8]: https://www.khronos.org
|
||||
[9]: http://www.w3c.org
|
||||
[10]: http://github.com/mozilla/hubs/
|
||||
[11]: https://github.com/matrix-org/thirdroom
|
||||
[12]: http://threejs.org
|
||||
[13]: http://babylonjs.com
|
||||
[14]: http://aframe.io
|
@ -0,0 +1,235 @@
|
||||
[#]: subject: "Distrobox: Try Multiple Linux Distributions via the Terminal"
|
||||
[#]: via: "https://itsfoss.com/distrobox/"
|
||||
[#]: author: "Pratham Patel https://itsfoss.com/author/pratham/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Distrobox: Try Multiple Linux Distributions via the Terminal
|
||||
======
|
||||
Distrobox is a software tool that allows you to run any Linux distribution inside the terminal.
|
||||
|
||||
It aims to let you run a variety of software on top of host distribution without any hassle.
|
||||
|
||||
For instance, — is there anything that is available only in the AUR and you want to access it from your Ubuntu system? Distrobox can give you that comfort.
|
||||
|
||||
### So, what exactly is Distrobox?
|
||||
|
||||
![distrobox][1]
|
||||
|
||||
Distrobox is a wrapper for `podman` or `docker` (whatever you prefer). The reason Distrobox exists is to integrate the containers within your system, as if it were native software.
|
||||
|
||||
A few things that it integrates into are removable devices (USB storage devices), D-Bus, user’s $HOME directory, Wayland and X11 sockets, and much more!
|
||||
|
||||
**Long story short**:
|
||||
|
||||
Distrobox is a way to make containerized software integrate like native apps, even if that containerized software belongs to a different distribution altogether.
|
||||
|
||||
The best thing about it, you get to build a development environment without requiring root privileges.
|
||||
|
||||
You do not have to change your host distribution just because of software compatibility issues. You can keep using what you’re comfortable with and use Distrobox to fill the gap for backward/forward software compatibility using any other Linux distribution.
|
||||
|
||||
### Features of Distrobox
|
||||
|
||||
![distrobox 1][2]
|
||||
|
||||
Now that you have an idea about Distrobox, what does it let you do overall? Are the functionalities useful to your use-case?
|
||||
|
||||
Let me mention the key highlights for Distrobox:
|
||||
|
||||
* Ability to make a test environment for making changes without affecting your host distribution.
|
||||
* A development environment that does not need sudo privileges can be flexible for your work. For instance, if you have a work laptop, a sudoless setup can help you.
|
||||
* Easy way to manage multiple environments.
|
||||
* Supports a variety of distributions.
|
||||
|
||||
### How to install Distrobox?
|
||||
|
||||
There is a prerequisite for installing Distrobox. That is, you must have either `podman` or `docker` installed. If you have a relatively modern Linux distribution, I recommend installing `podman` from your software repositories. Otherwise, install `docker` and follow the steps mentioned below.
|
||||
|
||||
At the time of writing this article, Distrobox is available in the following repositories:
|
||||
|
||||
* Arch Linux (AUR)
|
||||
* EPEL 8 and later
|
||||
* Fedora 34 and later
|
||||
* Ubuntu 22.10 and later
|
||||
|
||||
As you might have noticed, the latest version of Ubuntu available to the wider public is Ubuntu 22.04. Not many distributions have Distrobox packaged yet…
|
||||
|
||||
If you do not find it in the repositories, you can run the following command to install Distrobox:
|
||||
|
||||
```
|
||||
curl -s https://raw.githubusercontent.com/89luca89/distrobox/main/install | sudo sh
|
||||
```
|
||||
|
||||
The above command will download a shell script and run it with superuser privileges. In case you cannot verify the source yourself, below is the command you can use without feeling anxious about granting superuser privilege to an unknown script.
|
||||
|
||||
```
|
||||
curl -s https://raw.githubusercontent.com/89luca89/distrobox/main/install | sh -s -- --prefix ~/.local
|
||||
```
|
||||
|
||||
Now that you have Distrobox installed, let us proceed to a few examples of using it.
|
||||
|
||||
### Getting started with Distrobox
|
||||
|
||||
Having a screwdriver in your toolbox but never using is not going to improve your craftsmanship. So let’s go over a few basic commands to use [Distrobox][3], what they do and more.
|
||||
|
||||
Moreover, if you are curious, you can take a look at this video from a fellow YouTuber who tried Distrobox on Fedora Silverblue:
|
||||
|
||||
![A Video from YouTube][4]
|
||||
|
||||
#### 1. Create a new container
|
||||
|
||||
A ‘container’ in this context refers not to a containerized software like nextcloud, syncthing, etc but rather an operating system itself.
|
||||
|
||||
The syntax to create a new container is as follows:
|
||||
|
||||
```
|
||||
distrobox-create --name CONTAINER-NAME --image OS-NAME:VERSION
|
||||
```
|
||||
|
||||
In here, you can specify what name you wish to address your container by (CONTAINER-NAME), the name of OS you want to use (OS-NAME) and it’s version (VERSION).
|
||||
|
||||
Let us take a look at how to create a new container for Fedora 36 with the name ‘**fedoraonfoss**‘. I will do so with the following command:
|
||||
|
||||
```
|
||||
distrobox-create --name fedoraonfoss --image fedora:36
|
||||
```
|
||||
|
||||
You may also substitute ’36’ with ‘latest’ in case you want the latest version of any operating system.
|
||||
|
||||
This command will take only a moment to download the container image for Fedora 36.
|
||||
|
||||
Once the process finishes, you will get a message letting you know that the container was created.
|
||||
|
||||
![Distrobox 'fedoraonfoss' successfully created][5]
|
||||
|
||||
#### 2. Start and enter the container
|
||||
|
||||
An OS container is of no use if we do not start it and access its shell.
|
||||
|
||||
To do so, use the ‘**distrobox-enter**‘ command. The syntax is as following:
|
||||
|
||||
```
|
||||
distrobox-enter CONTAINER-NAME
|
||||
```
|
||||
|
||||
When you start the container for the first time, Distrobox will do an automatic initial setup of installing a few containers, setting up the mounts, themes, icons, fonts, groups, users and more.
|
||||
|
||||
Based on your computer’s processing power, this may take quite a long time. Please be patient for ~15 minutes during the first power-on.
|
||||
|
||||
When that is completed, you will be dropped in the shell of the container automatically.
|
||||
|
||||
![Entering the 'fedoraonfoss' Distrobox container][6]
|
||||
|
||||
If you look carefully, previously, when I ran the command ‘distrobox-enter’, the hostname shown on my prompt was ‘itsfoss’. Once the initial setup was done, now I am in a shell with a different hostname, that is ‘fedoraonfoss’.
|
||||
|
||||
Let us also check the VERSION from ‘/etc/os-release’ file.
|
||||
|
||||
![Comparing VERSION string from '/etc/os-release' between Ubuntu and Fedora][7]
|
||||
|
||||
#### 3. Install software
|
||||
|
||||
If you have reached this stage, this is the equivalent of freshly installing Fedora on your computer and the OS just booted.
|
||||
|
||||
Just like a virtual machine, the OS on our host machine does not matter. We have to use the package manager provided by the guest OS. Hence, I will be using the DNF package manager on Fedora 36.
|
||||
|
||||
My host operating system, Ubuntu 22.04 LTS, does not [yet] have [Foliate][8] in the first party repositories. But Fedora 36 has Foliate in the first party repositories. This way, I can easily install Foliate as a native software without making use of heavy virtualization.
|
||||
|
||||
So, let us install Foliate, since it is available in Fedora’s repositories but not in Ubuntu’s repositories.
|
||||
|
||||
I will run the following command (inside the container shell) to install Foliate:
|
||||
|
||||
```
|
||||
sudo dnf install foliate.noarch
|
||||
```
|
||||
|
||||
After dnf finishes installing Foliate, I will run the following command (inside the container shell) as well:
|
||||
|
||||
```
|
||||
distrobox-export --app foliate
|
||||
```
|
||||
|
||||
When you run the ‘**distrobox-export**‘ command from the container, it will make the specified software available to the host operating system as well. This means, even though Foliate is installed inside the Fedora container, I will be able to see it in Ubuntu’s Application Menu.
|
||||
|
||||
![Getting Foliate (installed in Fedora) visible in Ubuntu's Application Menu][9]
|
||||
|
||||
As you can see, I have Foliate visible in Ubuntu’s Application Menu, even though that was installed in a Fedora 36 container.
|
||||
|
||||
Isn’t that amazing?
|
||||
|
||||
#### 4. Integration of Distrobox applications
|
||||
|
||||
For the purposes of this demonstration, I have downloaded [The Linux Command Line][10]PDF book, written by William Shotts. It saved it in my Documents directory.
|
||||
|
||||
Let us see if a containerized software—that is packaged for a entirely different operating system—reacts to changes like switch from light mode to dark mode. Can it see my ‘~/Documents’ directory?
|
||||
|
||||
![Testing Foliate if it can pick up theme changes and also my $HOME directory][11]
|
||||
|
||||
As you can see, the theme changes are detected correctly, even the top bar has the correct icons for close button and hamburger menu.
|
||||
|
||||
On top of that, I do not need to copy my epub file to anywhere else. My ‘~/Documents’ directory was also correctly picked up.
|
||||
|
||||
Just like a native application!
|
||||
|
||||
#### 5. Manage Distrobox images
|
||||
|
||||
Distobox provides a few commands that can be used to manage Distrobox images.
|
||||
|
||||
The first command is ‘**distrobox list**‘. As evident from the name, it lists all the containers that are installed.
|
||||
|
||||
![Listing all Distrobox containers][12]
|
||||
|
||||
Since I have only one container, only ‘fedoraonfoss’ showed up, even though it exited a few moments ago.
|
||||
|
||||
The second command is ‘**distrobox stop**‘. This command is used to stop a running container.
|
||||
|
||||
Below is the syntax:
|
||||
|
||||
```
|
||||
distrobox stop CONTAINER-NAME
|
||||
```
|
||||
|
||||
Finally, to delete any Distrobox container, use the ‘distrobox rm’ command. The syntax is given below:
|
||||
|
||||
```
|
||||
distrobox rm CONTAINER-NAME
|
||||
```
|
||||
|
||||
To explore more technical details, head to its [GitHub page][13].
|
||||
|
||||
### Conclusion
|
||||
|
||||
Distrobox is a wonderful tool that allows you to install operating systems as a simple podman/docker container and use them as a full-fledged operating system.
|
||||
|
||||
Using Distrobox you can install virtually any software, even if it is not available in your distribution’s repositories, or even if it is not packaged for your Linux distribution. How useful is that?
|
||||
|
||||
There can be various use-cases for Distrobox. What do you think you will be using it for? Share your thoughts in the comments section down below.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/distrobox/
|
||||
|
||||
作者:[Pratham Patel][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://itsfoss.com/author/pratham/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://itsfoss.com/wp-content/uploads/2022/06/distrobox.jpg
|
||||
[2]: https://itsfoss.com/wp-content/uploads/2022/06/distrobox-1.jpg
|
||||
[3]: https://github.com/89luca89/distrobox
|
||||
[4]: https://youtu.be/Q2PrISAOtbY
|
||||
[5]: https://itsfoss.com/wp-content/uploads/2022/05/01_distrobox_create-800x579.webp
|
||||
[6]: https://itsfoss.com/wp-content/uploads/2022/05/02_distrobox_enter-800x579.webp
|
||||
[7]: https://itsfoss.com/wp-content/uploads/2022/05/03_distrobox_os_release-800x579.webp
|
||||
[8]: https://itsfoss.com/foliate-ebook-viewer/
|
||||
[9]: https://itsfoss.com/wp-content/uploads/2022/05/04_distrobox_export-800x600.webp
|
||||
[10]: https://www.linuxcommand.org/tlcl.php
|
||||
[11]: https://itsfoss.com/wp-content/uploads/2022/05/distrobox_app_test.gif
|
||||
[12]: https://itsfoss.com/wp-content/uploads/2022/05/05_distrobox_list-800x226.webp
|
||||
[13]: https://github.com/89luca89/distrobox
|
107
sources/tech/20220614 Share your Linux terminal with tmate.md
Normal file
107
sources/tech/20220614 Share your Linux terminal with tmate.md
Normal file
@ -0,0 +1,107 @@
|
||||
[#]: subject: "Share your Linux terminal with tmate"
|
||||
[#]: via: "https://opensource.com/article/22/6/share-linux-terminal-tmate"
|
||||
[#]: author: "Sumantro Mukherjee https://opensource.com/users/sumantro"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Share your Linux terminal with tmate
|
||||
======
|
||||
Tmate expands your options for session sharing with the Linux terminal.
|
||||
|
||||
![Terminal command prompt on orange background][1]
|
||||
|
||||
Image by: [iradaturrahmat][2]via [Pixabay][3], CC0
|
||||
|
||||
As a member of the Fedora Linux QA team, I sometimes find myself executing a bunch of commands that I want to broadcast to other developers. If you've ever used a [terminal multiplexer][4] like [tmux][5] or [GNU Screen][6], you might think that that's a relatively easy task. But not all of the people I want to see my demonstration are connecting to my terminal session from a laptop or desktop. Some might have casually opened it from their phone browser—which they can readily do because I use [tmate][7].
|
||||
|
||||
### Linux terminal sharing with tmate
|
||||
|
||||
Watching someone else work in a Linux terminal is very educational. You can learn new commands, new workflows, or new ways to debug and automate. But it can be difficult to capture what you're seeing so you can try it yourself later. You might resort to taking screenshots or a screen recording of a shared terminal session so you can type out each command later. The only other option is for the person demonstrating the commands to record the session using a tool like [Asciinema][8] or [script and scriptreplay][9].
|
||||
|
||||
But with tmate, a user can share a terminal either in read-only mode or over SSH. Both the SSH and the read-only session can be accessed through a terminal or as an HTML webpage.
|
||||
|
||||
I use read-only mode when I'm onboarding people for the Fedora QA team because I need to run commands and show the output, but with tmate, folks can keep notes by copying and pasting from their browser to a text editor.
|
||||
|
||||
### Linux tmate in action
|
||||
|
||||
On Linux, you can install tmate with your package manager. For instance, on Fedora:
|
||||
|
||||
```
|
||||
$ sudo dnf install tmate
|
||||
```
|
||||
|
||||
On Debian and similar distributions:
|
||||
|
||||
```
|
||||
$ sudo apt install tmate
|
||||
```
|
||||
|
||||
On macOS, you can install it using [Homebrew][10] or [MacPorts][11]. If you need instructions for other Linux distributions, refer to the [install][12] guide.
|
||||
|
||||
![Screenshot of terminal showing the options for tmate sharing: web session (regular and read-only) and ssh session (regular and read-only)][13]
|
||||
|
||||
Once installed, start tmate:
|
||||
|
||||
```
|
||||
$ tmate
|
||||
```
|
||||
|
||||
When tmate launches, links are generated to provide access to your terminal session over HTTP and SSH. Each protocol features a read-only option as well as a reverse SSH session.
|
||||
|
||||
Here's what a web session looks like:
|
||||
|
||||
![Screenshot showing tmate terminal window and 2 versions of sharing sessions demonstrating the same code][14]
|
||||
|
||||
Tmate's web console is HTML5, so, as a result, a user can copy the entire screen and paste it into a terminal to run the same commands.
|
||||
|
||||
### Keeping a session alive
|
||||
|
||||
You may wonder what happens if you accidentally close your terminal. You may also wonder about sharing your terminal with a different console application. After all, tmate is a multiplexer, so it should be able to keep sessions alive, detach and re-attach to a session, and so on.
|
||||
|
||||
And of course, that's exactly what tmate can do. If you've ever used tmux, this is probably pretty familiar.
|
||||
|
||||
```
|
||||
$ tmate -F -n web new-session vi console
|
||||
```
|
||||
|
||||
This command opens up `new-session` in Vi, and the `-F` option ensures that the session re-spawns even when closed.
|
||||
|
||||
![A screenshot of the terminal showing the output after using the new-session and -F options: connection information for either a web session (regular or read-only) or ssh session (regular or read-only)][15]
|
||||
|
||||
### Social multiplexing
|
||||
|
||||
Tmate gives you the freedom of tmux or GNU Screen plus the ability to share your sessions with others. It's a valuable tool for teaching other users how to use a terminal, demonstrating the function of a new command, or debugging unexpected behavior. It's open source, so give it a try!
|
||||
|
||||
Image by: (Sumantro Mukherjee, CC BY-SA 4.0)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/6/share-linux-terminal-tmate
|
||||
|
||||
作者:[Sumantro Mukherjee][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/sumantro
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://opensource.com/sites/default/files/lead-images/terminal_command_linux_desktop_code.jpg
|
||||
[2]: https://pixabay.com/en/users/iradaturrahmat-3964359/
|
||||
[3]: https://pixabay.com/en/ubuntu-computer-program-interface-3145957/
|
||||
[4]: https://opensource.com/article/21/5/linux-terminal-multiplexer
|
||||
[5]: https://opensource.com/downloads/tmux-cheat-sheet
|
||||
[6]: https://opensource.com/article/17/3/introduction-gnu-screen
|
||||
[7]: https://tmate.io/
|
||||
[8]: https://opensource.com/article/22/1/record-your-terminal-session-asciinema
|
||||
[9]: https://www.redhat.com/sysadmin/record-terminal-script-scriptreplay
|
||||
[10]: https://opensource.com/article/20/6/homebrew-mac
|
||||
[11]: https://opensource.com/article/20/11/macports
|
||||
[12]: https://tmate.io/
|
||||
[13]: https://opensource.com/sites/default/files/2022-06/install%20tmate_0.png
|
||||
[14]: https://opensource.com/sites/default/files/2022-06/tmate%20web%20session.png
|
||||
[15]: https://opensource.com/sites/default/files/2022-06/tmate%20keeping%20session%20alive.png
|
@ -0,0 +1,139 @@
|
||||
[#]: subject: "A beginner's guide to cloud-native open source communities"
|
||||
[#]: via: "https://opensource.com/article/22/6/cloud-native-open-source-communities"
|
||||
[#]: author: "Anita Ihuman https://opensource.com/users/anita-ihuman"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
A beginner's guide to cloud-native open source communities
|
||||
======
|
||||
Start participating in the cloud-native ecosystem, even if you're a complete beginner.
|
||||
|
||||
![Remote people connected on clouds][1]
|
||||
|
||||
Image by: Opensource.com
|
||||
|
||||
Some people think the cloud-native ecosystem has a high barrier to entry. At first glance, that looks like a logical assumption. Some of the technologies used in cloud-native projects are complex and challenging, if you're not familiar with them, so you might think you need proven expertise to get involved.
|
||||
|
||||
However, looks can be deceiving. This article provides a detailed roadmap to breaking into the cloud-native ecosystem as an open source contributor. I'll cover the pillars of cloud-native architecture, the Cloud Native Computing Foundation (CNCF), and ways to earn more.
|
||||
|
||||
Most importantly, after grounding you in the basics of cloud-native practices and communities, the article provides a three-step guide for getting started.
|
||||
|
||||
### What is cloud native?
|
||||
|
||||
A program is cloud native when it's explicitly developed to be integrated, hosted, and run on a cloud computing platform. Such an application possesses the cloud's inherent characteristics, such as portability, modularity, and isolation, and it adapts to the cloud deployment models of cloud service providers (CSPs).
|
||||
|
||||
Cloud computing is a general term for anything that delivers hosted services over the internet. It usually implies clusters of computers, a distributed file system, and containers. A cloud can be private or public. Cloud computing comes in three major categories: Platform-as-a-Service (PaaS), Software-as-a-Service (SaaS), and Infrastructure-as-a-Service (IaaS).
|
||||
|
||||
From a business perspective, cloud computing means that rather than investing heavily in databases, software, and hardware, companies opt for IT services over the internet, or cloud, and pay for them as they use them.
|
||||
|
||||
### Cloud-native infrastructure
|
||||
|
||||
Cloud-native infrastructure includes datacenters, operating systems, deployment pipelines, configuration management, and any system or software needed to complete the lifecycle of applications. These solutions enable engineers to make rapid, high-impact modifications with little effort, implement new designs, and execute scalable applications on public, personal, and hybrid clouds.
|
||||
|
||||
### Cloud-native architecture
|
||||
|
||||
Cloud architecture is a system designed to utilize cloud services. It leverages the cloud development model's distributed, reliable, scalable, and flexible nature. Networking, servers, datacenters, operating systems, and firewalls are abstracted. It enables enterprises to design applications as loosely coupled components and execute them on dynamic platforms using microservices architecture.
|
||||
|
||||
There are a few technologies that can be considered pillars of cloud-native architecture.
|
||||
|
||||
[Microservices][2] is an architectural system in which software systems are made up of small, independent services that communicate through well-defined application programming interfaces (APIs). This development method makes applications faster to develop and more scalable, encouraging innovation and accelerating time-to-market for new features. Microservices enable communication among applications using RESTful APIs and support independent deployment, updates, scaling, and restarts.
|
||||
|
||||
[DevOps][3] refers to the philosophy, practices, and tools that promote better communication and collaboration between application development and IT operations teams. The benefits of DevOps processes include:
|
||||
|
||||
* Enabling automated release pipelines and integration
|
||||
* Ensuring quick deployment to production
|
||||
* Encouraging collaboration between development and other departments
|
||||
|
||||
Continuous integration and continuous delivery (CI/CD) refers to a set of practices that encompass the culture, operating principles, and procedures for software development. CI/CD practices focus on automation and continuous monitoring throughout the lifecycle of apps, from integration and testing phases to delivery and deployment. The benefits of CI/CD include:
|
||||
|
||||
* Enabling frequent releases
|
||||
* Shipping software more quickly
|
||||
* Receiving prompt feedback
|
||||
* Reducing the risk of release
|
||||
|
||||
A [container][4] is a software package that contains all of the components (binaries, libraries, programming language versions, and so on) needed to run in any environment, making it possible for them to run on a laptop, in the cloud, or in an on-premises datacenter. A container is the optimal carrier for microservices.
|
||||
|
||||
### What is CNCF?
|
||||
|
||||
[CNCF][5] is a Linux Foundation project founded in 2015 to help advance container technology and align the tech industry around its evolution. A sub-organization of the Linux Foundation, it consists of a[collection of open-source projects][6] supported by ongoing contributions courtesy of a vast, vibrant community of programmers.
|
||||
|
||||
Founding members of the CNCF community include companies like Google, IBM, Red Hat, Docker, Huawei, Intel, Cisco, and others. Today, CNCF is supported by over 450 members. Its mission is to foster and sustain open source, vendor-neutral projects around cloud native.
|
||||
|
||||
Perhaps the most well-known project to come from CNCF is Kubernetes. The project was contributed to the Linux Foundation by Google as a seed technology and has since proven its worth by automating container-technology-based applications' deployment, scaling, and management.
|
||||
|
||||
### Learn cloud native
|
||||
|
||||
There are numerous resources to help you understand the basics of cloud-native architecture and technologies. You could start with these:
|
||||
|
||||
* Cloud-native glossary: The [Cloud Native Glossary][7], a project led by the CNCF Business Value Subcommittee, is a reference for common terms when talking about cloud-native applications. It was put together to help explain cloud-native concepts in clear and straightforward language, especially for those without previous technical knowledge.
|
||||
|
||||
**[[ More resources: Kubernetes glossary ]][8]**
|
||||
|
||||
##### Cloud-native communities
|
||||
|
||||
Outside the CNCF projects, some other cloud-native communities and initiatives aim toward sustaining and maintaining these cloud-based projects. They include:
|
||||
|
||||
* Special interest groups (SIGs) and working groups (WGs): SIGs are formed around different cloud-native elements in training and development. These groups meet weekly and discuss the community activity. You could also start a [new SIG][9].
|
||||
* Cloud-native community groups: There are [numerous meetup groups][10] focused on expanding the cloud-native community on a global scale. Many have regular meetings that you can be a part of.
|
||||
* CNCF TAG Network: TAG (for Technical Advisory Group) Network's mission is to enable widespread and successful development, deployment, and operation of resilient and intelligent network systems in cloud-native environments
|
||||
|
||||
##### Free training courses
|
||||
|
||||
Some training courses are available from the Linux Foundation to give beginners preliminary knowledge of cloud technologies. Some of these courses include:
|
||||
|
||||
* [Introduction to Kubernetes (LFS158)][11]
|
||||
* [Introduction to Cloud Infrastructure Technologies (LFS151)][12]
|
||||
|
||||
##### Paid certifications
|
||||
|
||||
There are also paid certification programs from CNCF that test and boost your knowledge of cloud-native technologies from zero to expert. These certifications have proven to be a great addition to practitioners' careers.
|
||||
|
||||
* Kubernetes and Cloud-Native Associate (KCNA): The KCNA certification prepares candidates to work with cloud-native technologies and pursue further CNCF certifications like CKA, CKAD, and CKS (see below).
|
||||
* Certified Kubernetes Application Developer (CKAD): A Kubernetes-certified application developer can design, build, configure, and expose cloud-native applications for Kubernetes, define application resources, and use core primitives to create, monitor, and troubleshoot scalable applications and tools in Kubernetes.
|
||||
* Certified Kubernetes Administrator (CKA): A certified Kubernetes administrator has demonstrated the ability to do the basic installation, configuration, and management of production-grade Kubernetes clusters. They understand critical concepts such as Kubernetes networking, storage, security, maintenance, logging and monitoring, application lifecycle, troubleshooting, and API primitives. A CKA can also establish primary use cases for end users.
|
||||
* Certified Kubernetes Security Specialist (CKS): Obtaining a CKS demonstrates possession of the requisite abilities to secure container-based applications and Kubernetes platforms during build, deployment, and runtime. A CKS is qualified to perform these tasks in a professional setting.
|
||||
* Cloud Foundry Certified Developer (CFCD) : CFCD certification is ideal for candidates who want to validate their skill set using the Cloud Foundry platform to deploy and manage applications.
|
||||
* FinOps Certified Practitioner (FOCP) : An FOCP will bring a strong understanding of FinOps, an operational framework combining technology, finance, and business to realize business and financial goals through cloud transformation. The practitioner supports and manages the FinOps lifecycle and manages the cost and usage of cloud resources in an organization.
|
||||
|
||||
All of these can be found in the [Linux Foundation training and certification catalog][13].
|
||||
|
||||
### Start your cloud-native journey in three steps
|
||||
|
||||
Now that you're equipped with all this information, you can choose the direction you want to take. If you're overwhelmed by the options, just go step by step:
|
||||
|
||||
1. Understand the basics: Due to the complex nature of most cloud-native technologies, someone new to this ecosystem should have preliminary knowledge of the core concepts. Basic knowledge of containerization, orchestration, cloud/infrastructure, and both monolithic and microservices architecture is a good start.
|
||||
2. Identify a cloud-native community or project: There are over [300 cloud-native communities][14] that exist today. It is a lot easier to break into the cloud-native community through these established groups. While some of these communities are initiatives to sustain cloud-native projects, others have projects that offer cloud-native services. You can begin your journey by participating in any of these communities. Research the groups and projects that align with your interest, then follow the onboarding steps and get familiar with the projects behind them.
|
||||
3. Find a niche within the community: Since most cloud-native communities are open source, the diverse skill of the community comes in handy. Explore the various opportunities that align with your skills and interest, whether that's frontend, backend, developer relations (DevRel), operations, documentation, program management, or community relations. It is easier to contribute to cloud-native projects with a well-defined niche according to your skills and experiences.
|
||||
|
||||
You now have a basic understanding of the cloud-native ecosystem, both from a technological and community point of view. You can further extend your knowledge now and get involved. And once you do, remember to share your journey with others in the spirit of open source!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/6/cloud-native-open-source-communities
|
||||
|
||||
作者:[Anita Ihuman][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/anita-ihuman
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://opensource.com/sites/default/files/lead-images/people_remote_teams_world.png
|
||||
[2]: https://opensource.com/article/19/11/microservices-cheat-sheet
|
||||
[3]: https://opensource.com/tags/devops
|
||||
[4]: https://opensource.com/resources/what-are-linux-containers
|
||||
[5]: https://www.cncf.io/
|
||||
[6]: https://landscape.cncf.io/
|
||||
[7]: https://glossary.cncf.io/
|
||||
[8]: https://enterprisersproject.com/kubernetes-glossary
|
||||
[9]: https://www.cncf.io/blog/2020/07/13/announcing-the-new-special-interest-group-on-contributor-strategy/
|
||||
[10]: https://community.cncf.io/
|
||||
[11]: https://training.linuxfoundation.org/training/introduction-to-kubernetes/
|
||||
[12]: https://training.linuxfoundation.org/training/introduction-to-cloud-infrastructure-technologies/
|
||||
[13]: https://training.linuxfoundation.org/full-catalog/
|
||||
[14]: https://landscape.cncf.io/?zoom=40
|
@ -0,0 +1,60 @@
|
||||
[#]: subject: "How I use LibreOffice keyboard shortcuts"
|
||||
[#]: via: "https://opensource.com/article/22/6/libreoffice-keyboard-shortcuts"
|
||||
[#]: author: "Jim Hall https://opensource.com/users/jim-hall"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
How I use LibreOffice keyboard shortcuts
|
||||
======
|
||||
Keyboard shortcuts keep me focused on the content that I'm meant to deliver, and not its appearance.
|
||||
|
||||
![Programming keyboard.][1]
|
||||
|
||||
Image by: Opensource.com
|
||||
|
||||
I have used word processing software for as long as I can remember. When word processors moved from direct formatting to leveraging styles to change how text appears on the page, that was a big boost to my writing.
|
||||
|
||||
LibreOffice provides a wide variety of styles that you can use to create all kinds of content. LibreOffice applies paragraph styles to blocks of text, such as body text, lists, and code samples. Character styles are similar, except that these styles apply to inline words or other short text inside a paragraph. Use the **View -> Styles** menu, or use the **F11** keyboard shortcut, to bring up the Styles selector.
|
||||
|
||||
![Image of LibreOffice styles][2]
|
||||
|
||||
Using styles makes writing longer documents much easier. Consider this example: I write a lot of workbooks and training material as part of my consulting practice. A single workbook might be 40 or 60 pages long, depending on the topic, and can include a variety of content such as body text, tables, and lists. Some of my technical training material may also include source code examples.
|
||||
|
||||
I have a standard training set that I offer clients, but I do custom training programs too. When working on a custom program, I might start by importing text from another workbook, and working from there. Depending on the client, I might also adjust the font and other style elements to match the client's style preferences. For other materials, I might need to add source code examples.
|
||||
|
||||
To enter sample source code using direct formatting, I need to set the font and adjust the margins for each code block in the workbook. If I later decide that my workbook should use a different font for body text or source code samples, I would need to go back and change everything. For a workbook that includes more than a few code samples, this could require several hours to hunt down every source code example and adjust the font and margins to match the new preferred format.
|
||||
|
||||
However, by using styles, I can update the definition once to use a different font for the Text Body style, and LibreOffice Writer updates my document everywhere that uses the Text Body style. Similarly, I can adjust the font and margins for the Preformatted Text style, and LibreOffice Writer applies that new style to every source code example with the Preformatted Text style. This is the same for other blocks of text, including titles, source code, lists, and page headers and footers.
|
||||
|
||||
I recently had the bright idea to update the LibreOffice keyboard shortcuts to streamline my writing process. I've redefined **Ctrl**+**B** to set character style Strong Emphasis, **Ctrl**+**I** to set character style Emphasis, and **Ctrl**+**Space** to set No Character Style. This makes my writing much easier, as I don't have to pause my writing so I can highlight some text and select a new style. Instead, I can use my new **Ctrl**+**I** keyboard shortcut to set the Emphasis character style, which is essentially italics text. Anything I type after that uses the Emphasis style, until I press **Ctrl**+**Space** to reset the character style back to the default No Character Style.
|
||||
|
||||
![Image of LibreOffice character styles][3]
|
||||
|
||||
If you want to set this yourself, use **Tools > Customize,** then click on the Keyboard tab to modify your keyboard shortcuts.
|
||||
|
||||
![Image of LibreOffice keyboard customizations][4]
|
||||
|
||||
LibreOffice makes technical writing much easier with styles. And by leveraging keyboard shortcuts, I've streamlined how I write, keeping me focused on the content that I'm meant to deliver, and not its appearance. I might change the formatting later, but the styles remain the same.
|
||||
|
||||
Image by: (Jim Hall, CC BY-SA 40)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/6/libreoffice-keyboard-shortcuts
|
||||
|
||||
作者:[Jim Hall][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/jim-hall
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://opensource.com/sites/default/files/lead-images/programming_keyboard_coding.png
|
||||
[2]: https://opensource.com/sites/default/files/2022-06/libreofficestyles.png
|
||||
[3]: https://opensource.com/sites/default/files/2022-06/libreofficecharstyles.png
|
||||
[4]: https://opensource.com/sites/default/files/2022-06/libreofficekeyboardcustom.png
|
@ -0,0 +1,105 @@
|
||||
[#]: subject: "Why Edge Computing is Important for IoT Applications"
|
||||
[#]: via: "https://www.opensourceforu.com/2022/06/why-edge-computing-is-important-for-iot-applications/"
|
||||
[#]: author: "Jitendra Bhatia https://www.opensourceforu.com/author/jitendra-bhatia/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Why Edge Computing is Important for IoT Applications
|
||||
======
|
||||
Smart IoT devices are all around us today, and are growing exponentially each year. With this growth come challenges in managing the data generated by these devices. Edge computing comes to the rescue here, as it processes data closer to the IoT device and helps to generate real-time responses.
|
||||
|
||||
![Why-Edge-Computing-is-Important-for-IoT-Applications-Featured-image][1]
|
||||
|
||||
IoT devices generate a very large amount of data that is processed and analysed for use in various applications. In the early days of IoT, most devices sent this data to the cloud for storage and analysis. As cloud servers are located very far from IoT devices, this led to a delay in getting processed data. New IoT applications require real-time data processing, for which cloud computing is too costly and not fast enough. Edge computing brings data processing services near the devices or the source of the data. This allows data from various IoT devices to be processed and analysed at the edge of the network, which results in lower latency and enhanced efficiency in data transportation. Data can then be sent to the cloud or data centre for long term processing and storage.
|
||||
|
||||
The Internet of Things or IoT refers to the large volume of intelligent devices connected to the Internet. These devices can be called nodes; they sense, collect and send data to each other through various communication protocols. IoT devices collect a large volume of heterogeneous data generated by sensors, which needs processing for extracting useful information to offer services to users. In traditional computing, data gathered by IoT devices is sent to cloud servers for processing, and the results are transferred to IoT devices for necessary action. The time required to send and get processed data from the cloud server is more, which is not acceptable for real-time applications such as healthcare, smart transportation, and smart grids.
|
||||
|
||||
### The challenges and emerging applications of IoT
|
||||
|
||||
As the data generated by various IoT applications increases exponentially, it brings new challenges in managing it. In many IoT applications, where reliable and real-time data delivery is required, cloud computing based services are not suitable to meet their demands. Most IoT applications face the following challenges:
|
||||
|
||||
* Scalability
|
||||
* Reliability
|
||||
* Transmission delay
|
||||
* Interoperability
|
||||
* Availability
|
||||
* Security and privacy
|
||||
|
||||
The rapid growth in IoT devices has opened up several applications in different domains, and especially in the field of communications. Many of these emerging applications are open to different sets of goals and requirements, but play a vital role in making our everyday activities easy, smart, and safe. Figure 1 shows the various emerging IoT applications.
|
||||
|
||||
![Figure 1: Emerging IoT applications][2]
|
||||
|
||||
### Role of edge computing in IoT
|
||||
|
||||
Edge computing processes and stores the data received at the edge of the network, which is near to the end users. The processing of data closer to the end devices decreases the transmission time, lowers bandwidth needs and increases the battery life of IoT devices. Edge computing offers benefits for many IoT applications, including reduced response time and improved communications efficiency, as compared to cloud computing.
|
||||
|
||||
IoT applications can be classified with respect to their delay sensitivity — a particular application may or may not be sensitive to delay, depending on the type of parameters it manages. We can choose between cloud computing and edge computing based on this delay sensitivity. Edge computing performs well in comparison with cloud computing for IoT, though it has limited computational power and storage. Most IoT applications require real-time services rather than greater computational power and storage.
|
||||
|
||||
Edge computing with IoT is extensively used in many industrial applications; it enables numerous new services for enterprises and users. Many emerging IoT applications, such as smart vehicles, smart grids, depend on edge computing. Advantages of edge computing in IoT include:
|
||||
|
||||
* Low latency
|
||||
* Longer battery life for IoT devices
|
||||
* Low bandwidth requirement
|
||||
* Resilience in systems
|
||||
* Scalability
|
||||
|
||||
### Fusion of edge computing with IoT
|
||||
|
||||
Edge computing is a cost-effective framework for extending the functionalities of cloud computing. In real-time IoT applications, it reduces the latency and also the response time. The features of edge computing such as low latency, mobility provision, location awareness, and dense distribution can solve the challenges the IoT industry is facing.
|
||||
|
||||
Figure 2 shows the three-layer architecture of edge computing based IoT. The bottom layer contains various smart IoT devices, which generate the data. Data gathered from this layer is sent to the edge layer, where data processing and data analytics tasks are performed at the edge nodes to make real-time decisions. Based on the decisions taken at the edge layer, data is sent to cloud servers for exhaustive analysis and stored there.
|
||||
|
||||
![Figure 2: Edge computing-IoT layered architecture][3]
|
||||
|
||||
### Emulators and simulators for edge IoT computing
|
||||
|
||||
The excellence of any IoT system is usually evaluated by the degree to which it fulfils the requirements of its users. The performance of an IoT application can be measured with various quality metrics like latency, energy efficiency, and scalability. These measurement metrics vary from application to application, because every application has different requirements. The simulation of real-world IoT infrastructures has gained substantial interest in the research community because performing experiments on them is both an expensive and time-consuming process.
|
||||
|
||||
There are a number of simulators that facilitate the evaluation of various aspects of IoT systems. Many of these are available for cloud computing and some of them are used to simulate the fusion of edge computing in an IoT environment. Here we briefly describe well-known edge computing simulators used for modelling, and compare them in terms of quality. Figure 3 shows the various simulators/emulators available for edge computing. Table 1 gives a comparison between these.
|
||||
|
||||
iFogSim simulator is used for simulating fog and edge computing, and to provide an evaluation tool to manage various resources. It is designed based on the CloudSim simulator, which is primarily used to simulate a cloud computing environment. It provides a quantitative evaluation of latency, energy utilisation, and network traffic.
|
||||
|
||||
IoTSim simulates edge computing scenarios, where a huge amount of data is processed in a Big Data processing system by the IoT system. It gives special focus on simulating communication and network delays among data storage and data processing virtual machines.
|
||||
|
||||
| Attributes | iFogSim | IoTSim | Edge CloudSim | FogNetSim++ | EmuFog | FogBed |
|
||||
| :- | :- | :- | :- | :- | :- | :- |
|
||||
| Scalability | × | √ | × | √ | × | × |
|
||||
| Mobility | × | × | × | √ | × | × |
|
||||
| Network delay | × | × | √ | √ | √ | × |
|
||||
| Energy consumption | √ | × | × | √ | × | × |
|
||||
| Bandwidth utilisation | √ | √ | √ | × | × | × |
|
||||
|
||||
Table 1: A comparison of edge simulators/emulators
|
||||
|
||||
EdgeCloudSim is explicitly designed for the evaluation of edge computing scenarios in IoT. It provides various models such as the mobility module, edge server module, and network link module to assess the several features of edge computing. It is user-friendly and provides a method to configure devices and applications using XML files.
|
||||
|
||||
FogNetSim++ is based on the prominent simulator OMNET++, which contains widespread network libraries and provides numerous network protocols. It empowers researchers to integrate user-defined mobility models and manage delivery mechanisms.
|
||||
|
||||
![Figure 3: Simulators/emulators for edge computing][4]
|
||||
|
||||
EmuFog emulator supports repeatable and manageable experiments with real-life applications. It emulates network topologies and is designed on top of the MaxiNet network emulator. However, it does not support mobility, both for fog nodes and clients, and also doesn’t provide hierarchical fog infrastructures.
|
||||
|
||||
Fogbed is an extension of the Mininet simulator. The network topology can be changed dynamically using Docker containers. However, it does not support the main facets of fog computing such as fault tolerance, scalability, security, and reliability.
|
||||
|
||||
IoT devices must be able to process data closer to end users, especially for time-critical applications. Edge computing is the best option for this. However, it’s still in an early stage of development and more research is needed for the efficient integration of edge computing with IoT.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.opensourceforu.com/2022/06/why-edge-computing-is-important-for-iot-applications/
|
||||
|
||||
作者:[Jitendra Bhatia][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.opensourceforu.com/author/jitendra-bhatia/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Why-Edge-Computing-is-Important-for-IoT-Applications-Featured-image.jpg
|
||||
[2]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-1-Emerging-IoT-applications.jpg
|
||||
[3]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-2-Edge-computing-IoT-layered-architecture.jpg
|
||||
[4]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-3-Simulators-emulators-for-edge-computing-1.jpg
|
@ -0,0 +1,43 @@
|
||||
[#]: subject: "Adobe Launches Open Source Toolkit To Contain Visual Misinformation"
|
||||
[#]: via: "https://www.opensourceforu.com/2022/06/adobe-launches-open-source-toolkit-to-contain-visual-misinformation/"
|
||||
[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "lkxed"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Adobe 推出了开源工具包以减少视觉错误信息
|
||||
======
|
||||
![Adobe][1]
|
||||
|
||||
Adobe 设想了一个充满照片和视频的网络,照片和视频上标注关于它们来自哪里的信息。该公司的主要目标是减少视觉错误信息的传播,不过,该系统也可以使那些“希望将自己的名字与工作关联起来”的内容创作者受益。
|
||||
|
||||
Adobe 的 <ruby>内容真实性计划<rt>Content Authenticity Initiative</rt></ruby> (CAI) 项目于 2019 年首次宣布,此后,它发布了一份关于实现该目标的技术白皮书,将该系统集成了到自己的软件中,并与新闻编辑室和硬件制造商展开了合作,以帮助普及其愿景。
|
||||
|
||||
现在,该公司发布了一个由三部分组成的开源工具包,从而把该技术交到开发人员手中并投入使用。Adobe 的新开源工具包括用于开发“在浏览器中显示内容凭据”的 JavaScript SDK、命令行实用程序和用于开发桌面应用程序、移动应用程序和其他用于创建、查看和验证嵌入式内容凭据的 Rust SDK。
|
||||
|
||||
众所周知,照片的 EXIF 数据中记录了有关光圈和快门速度的信息,这个新标准也采用了这种方式,它还记录有关文件创建的信息,例如文件的创建和编辑方式。如果该公司的共同愿景成真,这些 Adobe 称之为“内容凭证”的元数据,将在社交媒体平台、图像搜索平台、图像编辑器、搜索引擎中广泛可见。
|
||||
|
||||
C2PA 是 Adobe 的 CAI 与 微软、索尼、英特尔、推特以及 BBC 等合作伙伴的合作成果。华尔街日报、尼康和美联社最近也加入了 Adobe 的这个计划,即将 <ruby>内容认证技术<rt>content authentication</rt></ruby> 更加广泛地应用。
|
||||
|
||||
有了这些新工具,社交媒体平台就可以使用 Adobe 的 JavaScript SDK,快速让平台上的所有图像和视频显示内容凭据,这些凭据将会在鼠标悬停时,显示为右上角的一个图标。因此,无需专门的团队和更大的软件构建,该实施可以由几个开发人员在几周内完成。
|
||||
|
||||
CAI 的主要目标是打击互联网上的视觉错误信息,比如那些扭曲乌克兰战争的旧图片的重新传播,或是臭名昭著的南希·佩洛西的“廉价假货”。不过,数字监管链也可能使“作品被盗或出售”的内容创作者受益,这个问题多年来一直困扰着视觉艺术家,现在也正在 NFT 市场引发问题。
|
||||
|
||||
根据 Parsons 的说法,CAI 还引起了那些“制作合成图像和视频”的公司的巨大兴趣。公司可以将原始元数据嵌入到我们从 DALL-E 等模型中看到的那种 AI 创作中,从而确保它提供的合成图像不会轻易被误认为是真实的东西。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.opensourceforu.com/2022/06/adobe-launches-open-source-toolkit-to-contain-visual-misinformation/
|
||||
|
||||
作者:[Laveesh Kocher][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[lkxed](https://github.com/lkxed)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.opensourceforu.com/author/laveesh-kocher/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://www.opensourceforu.com/wp-content/uploads/2022/06/adobe.jpeg
|
@ -0,0 +1,140 @@
|
||||
[#]: subject: "KDE Plasma 5.25 Release is All About Color, Theme, and Other Improvements"
|
||||
[#]: via: "https://news.itsfoss.com/kde-plasma-5-25-release/"
|
||||
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "lkxed"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
KDE Plasma 5.25 发布:颜色、主题和其他改进
|
||||
======
|
||||
KDE Plasma 5.25 终于来了,它带来了许多视觉更新和有用的改进!
|
||||
|
||||
![Plasma 5.25][1]
|
||||
|
||||
KDE Plasma 5.25 一直是最受期待的版本之一,因为它最近的版本都专注于改进视觉效果和工作流程。
|
||||
|
||||
例如,[KDE Plasma 5.24][2] LTS 版本带来了升级的 Breeze 主题和全新的概览效果,改进了工作流程。
|
||||
|
||||
终于,KDE Plasma 5.25 带来了更多升级!
|
||||
|
||||
### KDE Plasma 5.25 更新内容
|
||||
|
||||
虽然,在 Plasma 5.25 的最终发布之前,我们已经知道了一些它的 [关键特性][3]。但是,既然它正式发布了,那就是时候和你简单介绍一下 KDE Plasma 5.25 的全部新功能啦!
|
||||
|
||||
**剧透一下**:大多数更新都涉及视觉改善和可用性改进。
|
||||
|
||||
#### 新壁纸
|
||||
|
||||
![][4]
|
||||
|
||||
如果你玩过 “[No Man's Sky][5]” 或类似的电子游戏,你可能会有似曾相识的感觉。
|
||||
|
||||
撇开这一点不谈,默认壁纸在旧壁纸进行了更新,具有完全不同的主题颜色。
|
||||
|
||||
#### 触摸板和触摸屏手势
|
||||
|
||||
Plasma 5.25 包括了一系列手势,以充分利用新功能。例如:四指捏合、从屏幕边缘滑动以触发概览效果或 <ruby>桌面网格<rt>Desktop Grid</rt></ruby> 等。
|
||||
|
||||
你可以使用该版本支持的 1:1 手势,轻松管理虚拟桌面,并在工作区之间切换。
|
||||
|
||||
你可以前往 <ruby>工作区行为<rt>Workspace Behavior</rt></ruby> 设置来调整你需要的操作。
|
||||
|
||||
#### 支持选择性应用全局主题
|
||||
|
||||
![KDE Plasma 5.25][6]
|
||||
|
||||
当你继续在系统设置应用 <ruby>全局主题<rt>Global Theme</rt></ruby> 时,系统将提示你,是否要将主题应用到任何地方,或是只应用到它的某些部分。
|
||||
|
||||
你可以将它应用于特定的外观选项,也可以用它来替换整个配置。
|
||||
|
||||
也就是说,当将全局主题应用于使用 KDE 的系统时,这个更新在自定义方面提供了细粒度的控制。
|
||||
|
||||
#### 根据当前壁纸自动生成强调色
|
||||
|
||||
以前,我们总觉得能够选择自定义或预设强调色,就已经足够了。
|
||||
|
||||
现在,有了 KDE Plasma 5.25,你可以根据当前壁纸自动生成强调色。它应该也能够与墙纸幻灯片一起使用。
|
||||
|
||||
![][7]
|
||||
|
||||
所以,如果你既想要找点东西来匹配你的背景,又不想要自己花力气制作,那么这个选项应该会对你有用。
|
||||
|
||||
![][7a]
|
||||
|
||||
这是新功能库的一个微小而强大的补充。
|
||||
|
||||
#### 带有强调色的配色方案
|
||||
|
||||
为了更好地自定义外观/观感,KDE Plasma 5.25 将允许部为你选择的强调色定制配色方案。
|
||||
|
||||
![KDE Plasma 5.25][8]
|
||||
|
||||
如果你喜欢配色主题的用户体验,你可以启用/禁用它。
|
||||
|
||||
#### 触控模式改进
|
||||
|
||||
![][9]
|
||||
|
||||
当你在桌面环境中使用触摸模式时(通过支持的设备或手动),KDE Plasma 5.25 将增大 KDE 应用程序的任务管理器、系统托盘和标题栏的大小,使它们更易于访问。
|
||||
|
||||
#### Discover 软件中心的改进
|
||||
|
||||
Discover 软件中心有一些细微的变化。以前,你需要单独浏览“应用程序”、“附加组件”和 “Plasma 附加组件”等类别;而现在,你在侧边栏中就可以找到所有应用程序类别。
|
||||
|
||||
![KDE Plasma 5.24][10]
|
||||
|
||||
![KDE Plasma 5.25][11]
|
||||
|
||||
此外,对于 Flatpak 应用程序,你可以看到它所需的权限。还有,应用程序页面也获得了一些升级,以显示有关你查看的应用程序的更多信息。
|
||||
|
||||
#### 其他改进
|
||||
|
||||
其他重要的改进包括定制功能的升级和工作流程的修改。其中包括:
|
||||
|
||||
* 一个新的混合效果,用于使动画颜色之间的过渡更加平滑,每当你改变主题/颜色,它都会自动改变。
|
||||
* 强大的容纳管理功能,它允许你在监视器之间移动桌面以及文件夹/小部件,即使你已断开它们的连接。
|
||||
* Kwin 脚本设置页面已被重写。
|
||||
* 键盘导航有了自定义快捷方式支持和系统托盘图标。
|
||||
* 新增一个浮动面板,用于在面板周围添加边距。
|
||||
* 改进了 KRunner 的性能。
|
||||
* 网络小部件添加了 Wi-Fi 网络的频率和 BSSID 的详细信息。
|
||||
|
||||
如果你仍然好奇,可以查看 [公告][12] 以了解更多信息。
|
||||
|
||||
### 尝试 KDE Plasma 5.25
|
||||
|
||||
一旦 KDE Neon 更新可用,你就可以下载它,以获取最新的 KDE Plasma 5.25。如果你等不及了,测试版也是个不错的选择(如果你愿意尝试的话)。
|
||||
|
||||
[KDE Neon][13]
|
||||
|
||||
对于其他 Linux 发行版,你将不得不等待开发人员推送更新(LTS 版除外)。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://news.itsfoss.com/kde-plasma-5-25-release/
|
||||
|
||||
作者:[Ankush Das][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[lkxed](https://github.com/lkxed)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://news.itsfoss.com/author/ankush/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://news.itsfoss.com/wp-content/uploads/2022/06/plasma-5-25-feat.jpg
|
||||
[2]: https://news.itsfoss.com/kde-plasma-5-24-lts-release/
|
||||
[3]: https://news.itsfoss.com/plasma-5-25-features/
|
||||
[4]: https://news.itsfoss.com/wp-content/uploads/2022/06/plasma-5-25-wallpaper-1024x576.jpg
|
||||
[5]: https://www.nomanssky.com/
|
||||
[6]: https://news.itsfoss.com/wp-content/uploads/2022/06/apply_global_theme_advanced.png
|
||||
[7]: https://news.itsfoss.com/wp-content/uploads/2022/06/blue_accent.jpg
|
||||
[7a]: https://player.vimeo.com/video/720193948
|
||||
[8]: https://news.itsfoss.com/wp-content/uploads/2022/04/tint-color-scheme-1024x751.png
|
||||
[9]: https://news.itsfoss.com/wp-content/uploads/2022/06/tablet_context_menu.png
|
||||
[10]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/04/kde-discover-plasma-5-25.png?ssl=1
|
||||
[11]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/04/kde-plasma-5-25-discover.png?ssl=1
|
||||
[12]: https://kde.org/announcements/plasma/5/5.25.0/
|
||||
[13]: https://neon.kde.org/download
|
@ -1,138 +0,0 @@
|
||||
[#]: subject: "7 pieces of Linux advice for beginners"
|
||||
[#]: via: "https://opensource.com/article/22/5/linux-advice-beginners"
|
||||
[#]: author: "Opensource.com https://opensource.com/users/admin"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "lightchaserhy"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
给Linux初学者的7条建议
|
||||
======
|
||||
我们咨询了社区Linux专家分享他们的初学经验。
|
||||
|
||||
![Why the operating system matters even more in 2017][1]
|
||||
|
||||
对Linux的新用户有什么建议?我们咨询了社区专家分享他们初学时的最佳经验。
|
||||
|
||||
### 1.用好Linux资源
|
||||
|
||||
我哥们儿告诉我Linux就像一个“软件积木搭建套装”(相当于50到60年代流行的建筑积木玩具),这个比喻比较恰当。在2001年和2002年,我曾经利用Windows3.1 和Windows NT,尝试搭建安全易用的K12学校区域网站,当时网上可用的资料不多。其中被推荐的“ROOT用户指南”是一本“大部头”专业教程,信息丰富但是有一定上手难度。
|
||||
|
||||
于我而言,Mandrake Linux的线上课程是最有用的资源。课程对使用和管理Linux桌面或服务器进行了详细的解读。我通过课程学习同时利用 Red Hat网站的列表资源进行实验,有问题时就在社区提问寻求帮助。
|
||||
|
||||
—— [Don Watkins][2]
|
||||
|
||||
### 2.在Linux社区寻求帮助
|
||||
|
||||
我的建议是要多问,你可以从网上搜索信息开始,看看其他人类似的问题(甚至是更好的提问)。问什么和如何问需要花一定时间熟悉。
|
||||
|
||||
一旦你更加熟悉Linux,查看你感兴趣的各种相关论坛,在提问前,先看看是否有人已经提过相同问题,并获得了答案。
|
||||
|
||||
加入一个邮件小组也很有用,最后你会发现自己也能专业地答复提问。正如他们说,通过回答他人的问题也会学到更多知识。
|
||||
|
||||
同时,你会越来越熟悉这个操作系统内部运行机制,再也不是初学时的一无所知。
|
||||
|
||||
—— [Greg Pittman][3]
|
||||
|
||||
我的建议是利用man、info等帮助命令获取信息。当然,尽可能花时间熟悉命令行界面且真正理解UNIX的设计理念。事实上,我最喜欢的书之一就是一本80年代的UNIX书籍,对理解文件、目录、设备、基础命令等非常有帮助。
|
||||
|
||||
—— [Alan Formy-Duval][4]
|
||||
|
||||
我最好的建议是充分相信社区的答复以及关于详细介绍“如何”使用不同选项的操作手册。无论如何,我在2009年左右开始学习,当时有很多可用的工具和资源,包括一个叫“Linux from Scratch(LFS)”的项目,从源码开始创建Linux系统,在这个项目我学会了很多内部原理知识和创建一个LFS镜像。
|
||||
|
||||
—— [Sumantro Mukherjee][6]
|
||||
|
||||
我的建议是泛读。利用像“Ask Fedora”、“the Fedora Matrix chat”等论坛,阅读他人的经验观点,并且尝试实践。我通过阅读他人的网上争论学习到很多东西,特别是要清楚问题产生的原因。
|
||||
|
||||
—— [Steve Morris][8]
|
||||
|
||||
### 3.安装双操作系统
|
||||
|
||||
我在90年代末就开始安装双操作系统(Windows和Linux),当我想学习Linux操作系统时,便重启工作时使用的Windows系统。最好的建议之一是改变计算机系统启动顺序(默认进入Windows),避免启动时因为手速不快,自动进入Linux系统还得重启。:)
|
||||
|
||||
—— [Heike Jurzik][9]
|
||||
|
||||
我的挑战来自于团队工作,做一个知识交换平台。
|
||||
|
||||
我们的Linux系统管理员利用Joomla搭建网站,Joomla是我们web团队研发的内容管理系统,管理员也想了解这个系统,我打算采用Linux服务器(以前一直是用Windows)。
|
||||
|
||||
我们一开始就安装双操作系统,因为有大量依赖操作系统的业务软件,但这促使了我要采用Linux。在我们各自学习新系统时,成员都作为专家互相鼓励、交流非常有助于共同成长,“一个都不能少!”,坚持不懈是一个很大的挑战。
|
||||
|
||||
我经历一个相当尴尬的低级错误后,在显示器上贴了一个大便签,上面写着“在使用任何rm操作前,首先要思考一下”。管理员给我写了一个命令行大全(网上有很多类似资料),对于熟悉基础操作非常有用。我开始使用Ubuntu的桌面环境时,发现初学者在图像化的操作界面能快速上手。
|
||||
|
||||
从那以后我就开始长期使用Linux(除了我的工作计算机),管理员仍然忙于 Joomla,看起来我俩都得到了成长。
|
||||
|
||||
—— [Ruth Cheesley][12]
|
||||
|
||||
### 4.为了安全请先备份
|
||||
|
||||
我的建议是使用一个简单且专业的备份软件发行版。一般新的Linux用户将创建、编辑、破坏和恢复系统配置。当操作系统无法启动、丢失数据时,会让他们非常沮丧。
|
||||
|
||||
有了备份软件,他们的数据就有了保障。
|
||||
|
||||
我们都喜爱Linux,因为它能让我们自由飞翔,但这是“双刃剑”,使用不当也有可能发生非常严重的错误。
|
||||
|
||||
—— [Giuseppe Cassibba][13]
|
||||
|
||||
### 5.分享你的Linux经验
|
||||
|
||||
我的建议是分享你的Linux使用经验。我曾经认为新的发行版本更适合新用户,所以当他们咨询Linux时,我总是推荐新的发行版。但是当我坐在他们的计算机前,发现似乎眼前的Linux系统从未看见过,因为一些新功能我也不熟悉。现在当有人咨询时,我会推荐自己使用的版本,虽说这不一定是初学者的最佳版本,但毕竟我最熟悉,他们遇到的问题我就能够快速解决(当然我自己也会在分享中学到新东西)。
|
||||
|
||||
—— [Seth Kenlon][14]
|
||||
|
||||
以前有句俗话叫“不要随便使用杂志封面上宣传的发行版,使用你朋友都在用的,当你遇到问题时才能更好地需求帮助”。将关键词“杂志封面”替换为“互联网”,这句话依然有效:-) 。我从未听从过这个建议,所以我是50公里半径内唯一使用Linux的人,周围都在用 FreeBSD、 IRIX、 Solaris和 Windows 3.11等操作系统,最后我就是那个寻求Linux帮助的人。
|
||||
|
||||
—— [Peter Czanik][15]
|
||||
|
||||
### 6. 6.坚持学习Linux
|
||||
|
||||
在到Red Hat工作前我是一名分销商合作伙伴,我有几个带旅行护士的家庭健康代理机构客户,他们使用了一个叫“Carefacts”的软件包,最初用于DOS,在旅行笔记本电脑和中心数据库同步中总是出错。
|
||||
|
||||
早期我听到的最好建议是认真关注开源运动。开源在2022年是主流思想,但在一代人以前,从Red Hat的零售商购买Linux安装光盘是带有革命性的创新行为。开源打破了常规,我认为要客观看待开源,但确实惊叹到了相当一部分人。
|
||||
|
||||
我的公司在20世纪90年代中期搭建了第一个客户防火墙,基于Windows NT和Altavista的一个产品,但是经常发生错误崩溃。我们自己又搭建了一个基于Linux的防火墙,再也没有出问题了。因此,我们用Linux替换了那套客户Altavista系统,稳定地运行了多年。我们在1999年底搭建了另一个客户防火墙,当时我花三周读完了一本关书,关于数据包过滤和ipchains的正确使用,当我完成时感觉超赞,解决了所有问题。在接下来的15年,我搭建安装了数百个防火墙系统,主要采用iptables技术,有些利用桥接器或ARP代理以及QOS保障视频会议传输,有些利用IPSEC和 OpenVPN tunnels。我靠管理个人防火墙和一些双机热备系统赚取生活所需费用,非常不错,而以前都是用的Windows系统。我甚至还建了一些虚拟防火墙。
|
||||
|
||||
但是技术在高速发展,2022年,iptables已过时,我以前的防火墙技术也成了美好的回忆。目前的经验之谈?永远不要停止探索。
|
||||
|
||||
—— [Greg Scott][19]
|
||||
|
||||
### 7.享受过程
|
||||
|
||||
耐心点,Linux和之前你熟悉的操作系统不太相同,准备拥抱一个充满无限可能的新世界,尽情享受吧。
|
||||
|
||||
—— [Alex Callejas][20]
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/5/linux-advice-beginners
|
||||
|
||||
作者:[Opensource.com][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[lightchaserhy](https://github.com/lightchaserhy)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/admin
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://opensource.com/sites/default/files/lead-images/yearbook-haff-rx-linux-file-lead_0.png
|
||||
[2]: https://opensource.com/users/don-watkins
|
||||
[3]: https://opensource.com/users/greg-p
|
||||
[4]: https://opensource.com/users/alanfdoss
|
||||
[5]: https://linuxfromscratch.org/
|
||||
[6]: https://opensource.com/users/sumantro
|
||||
[7]: https://ask.fedoraproject.org
|
||||
[8]: https://opensource.com/users/smorris12
|
||||
[9]: https://opensource.com/users/hej
|
||||
[10]: https://opensource.com/downloads/linux-common-commands-cheat-sheet
|
||||
[11]: https://opensource.com/article/22/2/why-i-love-linux-kde
|
||||
[12]: https://opensource.com/users/rcheesley
|
||||
[13]: https://opensource.com/users/peppe8o
|
||||
[14]: https://opensource.com/users/seth
|
||||
[15]: https://opensource.com/users/czanik
|
||||
[16]: https://www.redhat.com/sysadmin/run-your-own-vpn-libreswan
|
||||
[17]: https://opensource.com/article/21/8/openvpn-server-linux
|
||||
[18]: https://opensource.com/article/19/7/make-linux-stronger-firewalls
|
||||
[19]: https://opensource.com/users/greg-scott
|
||||
[20]: https://opensource.com/users/darkaxl
|
@ -0,0 +1,125 @@
|
||||
[#]: subject: "Why Do Enterprises Use and Contribute to Open Source Software"
|
||||
[#]: via: "https://www.linux.com/news/why-do-enterprises-use-and-contribute-to-open-source-software/"
|
||||
[#]: author: "Dan Whiting https://www.linuxfoundation.org/blog/why-do-enterprises-use-and-contribute-to-open-source-software/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "aREversez"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
企业为何使用开源软件,又为何推动开源软件的发展
|
||||
======
|
||||
每当人们知道我在 <ruby>Linux 基金会<rt>Linux Foundation</rt></ruby> 工作,他们总是会问我们的工作具体是做什么的。有时候,他们会一直问我是不是开发 Linux 操作系统的。我只能回答说,我们做的是开源软件,并试图在他们失去兴趣之前,将对世界的重大影响赌在短短的 20 秒上。如果他们的兴趣还在,想要进一步了解,我就会给他们深入分析一番:企业为何想参与到开源软件项目之中?它们为何会使用开源软件?没错,企业确实会这样做,无论它们有没有意识到这一点。此外,成千上万的企业会将企业内部代码捐给开源项目,为推动开源软件的进一步开发和优化投入大量的时间和资源。
|
||||
|
||||
### 开源软件的使用范围有多广
|
||||
|
||||
引用我们基金会最近发表的一项报告 <ruby>《企业开源指南》<rt>A Guide to Enterprise Open Source</rt></ruby>,“<ruby>开源软件<rt>open source software</rt></ruby>(OSS)改变了世界,是数字经济的支柱,数字世界的基石。从我们日常使用的互联网和移动应用到开拓未来的操作系统和程序语言,开源软件无不发挥着重要的作用,可谓是科技行业的命脉。在今天,开源软件驱动数字经济发展,推进科学技术取得突破,不断改善人们的生活水平。手机、汽车和飞机等设备,家庭、企业和政府等群体都在使用着开源软件。但就在 20 年前,开源软件还仅仅为少数人所知,为少数热心爱好者们组成的群体所用。”
|
||||
|
||||
如今,情况可大不相同了:
|
||||
|
||||
* 在各行业的 <ruby>垂类软件栈<rt>vertical software stacks</rt></ruby> 中,开源软件的占比达到了 20%-85%。
|
||||
* 超过 90% 的网站服务器和联网设备都依靠 Linux 来运行。
|
||||
* 安卓手机系统也是基于 Linux 内核。
|
||||
* 用于应用程序开发的 AMP、Appium、Dojo、jQuery、Marko、Node.js 等 [主流的库和工具][1] 均属于开源项目。
|
||||
* 世界上排名位列前 100 名的超级计算机都在使用 Linux。
|
||||
* 大型机客户均在使用 Linux。
|
||||
* AWS、Google 以及 Microsoft 三大云服务供应商都在使用开源软件运行服务,策划并在云端发起开源解决方案。
|
||||
|
||||
### 企业为何想参与到开源软件项目之中
|
||||
|
||||
企业参与开源软件项目主要通过三种方式:
|
||||
|
||||
* 企业向开源社区捐赠自家开发的软件。
|
||||
* 企业向开源软件项目提供直接的资金援助。
|
||||
* 企业向开源项目分派软件开发人员以及其他员工。
|
||||
|
||||
人们经常会问,为什么这些企业愿意放弃自家软件的所有权?为什么它们不让员工专攻自家软件的开发呢?
|
||||
|
||||
从整体上来看,这一问题的答案就是,企业和组织聚集起来,合力解决共同的难题,如此一来,他们就可以各自专注于在这基础上的各类难题。这些企业明白,将资源聚集在一起,能够更好地解决基础问题。有时,这种现象被叫做“竞合”,大概的意思是企业在一些领域可能互为竞争对手,但是它们在另一些领域则会互相合作。
|
||||
|
||||
“竞合”现象的一些典型例子:
|
||||
|
||||
* 铁路公司采用统一的铁轨尺寸,统一规划建设。得益于此,火车就可以在同样铁轨上运行,铁路公司之间也可以互相交换设备。
|
||||
* 在数码相机诞生之前,不同的公司在电影和摄像机行业各行创新之路,形成了各自的优势,但为了推进电影行业的发展,它们在相机链轮间距这一问题上达成了统一。
|
||||
* 娱乐产业在开展竞争的同时,也一致坚持采用家用录像系统和蓝光格式。
|
||||
|
||||
如今,企业、组织以及个体在合力解决难题的同时,也在不断地改进自身的产品与业务。
|
||||
|
||||
[<ruby>来此加密<rt>Let’s Encrypt</rt></ruby>][2] 是一个免费开放的自动化证书颁发机构,旨在通过简化安装程序,减低安装费用,快速扩大安全网络协议的应用范围。该机构为超过 2.25 亿个网站提供服务,每天平均发放证书约 150 万张。
|
||||
|
||||
好莱坞成立的 [<ruby>学院软件基金会<rt>Academy Software Foundation</rt></ruby>][3] 通过共同开发软件,推动娱乐、游戏和媒体等产业的增长,为产业发展提供开放标准,在电影行业内 [创造了巨大的价值][4]。
|
||||
|
||||
<ruby>超级账本<rt>Hyperledger</rt></ruby> 基金会发起了多个企业级区块链软件项目。众所周知,这些项目 [消耗的能源远比其他解决方案要少][5]。
|
||||
|
||||
[LF Energy 基金会][6] 推动 [电网朝着更加模块化、互操作和可拓展的方向发展][7],助力提升可再生能源的利用率。
|
||||
|
||||
[Dronecode 基金会][8] 致力于无人机软件的开发,促进企业在无人机领域进一步开拓创新。
|
||||
|
||||
[<ruby>开源软件软件安全基金会<rt>OpenSSF</rt></ruby>][9] 聚集了顶尖的科技企业,共同强化开源软件的安全与韧性。
|
||||
|
||||
[Kubernetes][10] 是 Google 捐赠给 Linux 基金会下属的云原生计算基金会(CNCF)的一个项目,是管理基于云计算软件的首选方案。
|
||||
|
||||
上述只是企业参与的一小部分开源软件项目,点击[此处][11],在 Linux 基金会官网浏览全部项目列表。
|
||||
|
||||
### 企业如何有效利用和参与开源软件项目?
|
||||
|
||||
若想要更好地利用开源项目,更有效地参与开源项目,企业可以向 Linux 基金会寻求帮助。我们最新发布的报告 [《企业开源指南》][12] 提供了企业与组织需要了解的大部分信息。这份报告凝聚了来自多家顶级企业、具有几十年丰富经验的开源领袖的知识与智慧,报告主要分为以下六个章节:
|
||||
|
||||
* 使用开源软件
|
||||
* 准备参与开源
|
||||
* 制定开源策略
|
||||
* 部署基础设施
|
||||
* 建立人才团队
|
||||
* 应对多方挑战
|
||||
|
||||
此外,Linux 基金会还提供了许多开源 [培训课程][13]、全年 [活动][14]、[LFX 平台][15],发起开源项目,协助企业与组织利用和参与开源项目,比如:
|
||||
|
||||
[TODO 工作组][16] 为开源项目办公室的建立和运作提供资源,包括其自身 [丰富的指导意见][17]。
|
||||
|
||||
[Openchain 项目][18] 旨在提供和维护国际开源许可标准,包括各种许可规定的相关信息。依赖于此,企业可以确保自身行为符合法律规定。
|
||||
|
||||
[FinOps 基金会][19] 目前正在将自身打造为“不断发展的云财务管理和文化实践平台,通过促进工程、财务、技术以及商业团队之间在数据驱动支出决策方面的合作,确保企业能够最大化实现商业价值”。
|
||||
|
||||
[Software Data Package Exchange (SPDX)][20] 是一个用于交流 <ruby>软件构成清单<rt>software bill of materials</rt></ruby>(SBOMs)的开放标准。在该标准下,每个用户都能清楚了解整个软件包中包括哪些软件。
|
||||
|
||||
重复一遍,上述这些只是 Linux 基金会所有项目中的一小部分。所有这些项目都致力于帮助企业接受和使用开源项目,引导企业为开源项目做出贡献、提供捐赠。
|
||||
|
||||
总而言之,目前,企业正在迅速投向开源软件项目,借此解决共同的难题,并探索进一步的创新发展,而 Linux 基金会将为它们提供帮助。
|
||||
|
||||
该文 [《企业为何使用开源软件,又为何推动开源软件的发展》][21] 首发于 [Linux 基金会][22] 官网。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.linux.com/news/why-do-enterprises-use-and-contribute-to-open-source-software/
|
||||
|
||||
作者:[Dan Whiting][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[aREversez](https://github.com/aREversez)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.linuxfoundation.org/blog/why-do-enterprises-use-and-contribute-to-open-source-software/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://openjsf.org/projects/
|
||||
[2]: https://letsencrypt.org/
|
||||
[3]: https://www.aswf.io/
|
||||
[4]: https://linuxfoundation.org/tools/open-source-in-entertainment/
|
||||
[5]: https://linuxfoundation.org/tools/carbon-footprint-of-nfts/
|
||||
[6]: https://www.lfenergy.org/
|
||||
[7]: https://linuxfoundation.org/tools/paving-the-way-to-battle-climate-change-how-two-utilities-embraced-open-source-to-speed-modernization-of-the-electric-grid/
|
||||
[8]: https://www.dronecode.org/projects/
|
||||
[9]: https://openssf.org/
|
||||
[10]: https://kubernetes.io/
|
||||
[11]: https://linuxfoundation.org/projects/
|
||||
[12]: https://linuxfoundation.org/tools/guide-to-enterprise-open-source/
|
||||
[13]: https://training.linuxfoundation.org/
|
||||
[14]: https://events.linuxfoundation.org/
|
||||
[15]: https://lfx.linuxfoundation.org/
|
||||
[16]: https://todogroup.org/
|
||||
[17]: https://linuxfoundation.org/resources/open-source-guides/
|
||||
[18]: https://www.openchainproject.org/resources
|
||||
[19]: https://www.finops.org/introduction/what-is-finops/
|
||||
[20]: https://spdx.dev/
|
||||
[21]: https://www.linuxfoundation.org/blog/why-do-enterprises-use-and-contribute-to-open-source-software/
|
||||
[22]: https://www.linuxfoundation.org/
|
@ -0,0 +1,384 @@
|
||||
[#]: subject: (Create a countdown clock with a Raspberry Pi)
|
||||
[#]: via: (https://opensource.com/article/21/3/raspberry-pi-countdown-clock)
|
||||
[#]: author: (Chris Collins https://opensource.com/users/clcollins)
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (Donkey-Hao)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
||||
使用树莓派做一个倒计时闹钟
|
||||
======
|
||||
使用树莓派和 ePaper 显示器开始倒计时您的下一个假期。
|
||||
![Alarm clocks with different time][1]
|
||||
|
||||
2021年[ Pi Day ][2]来了又走,留下美好的回忆以及[许多树莓派项目][3]等待我们去尝试。在任何令人精神振奋、充满欢乐的假期后回到工作中都很难, Pi Day 也不例外。当我们回望三月的时候,渴望那些天的快乐。但是不用害怕,亲爱的 Pi Day 庆祝者们,我们开始下一个 Pi Day 的漫长倒计时!
|
||||
|
||||
好了,严肃点。我做了一个 Pi Day 倒计时器,你也可以!
|
||||
|
||||
不久前,我购买了一个 [树莓派 Zero W][4] 并且用它来 [解决 WiFi 较差的原因][5] 。我也对使用 ePaper 来作为显示器十分感兴趣。而我却没有一个很好的用途,但是那看起来很有趣!我买了一个十分适合放在树莓派的顶部的 2.13 英寸的 [ WaveShare 显示器][6] 。安装很简单:只需要将显示器接到树莓派的 GPIO 上即可。
|
||||
|
||||
我使用 [树莓派系统][7] 来实现该项目,虽然其他的操作系统肯定也能完成。但是下面的 `raspi-config` 指令在树莓派系统上很容易使用。
|
||||
|
||||
### 设置树莓派和 ePaper 显示器
|
||||
|
||||
设置树莓派和 ePaper 显示器一起工作,需要你在树莓派上启用串行外设接口 (SPI) 软件,安装 BCM2835 C 库(来访问树莓派上的 Broadcom BCM 2835 芯片的 GPIO 函数),安装 Python GPIO 库来控制 ePaper 显示器。最后,你需要安装 WaveShare 的库来使用 Python 控制 2.13 英寸的显示器。
|
||||
|
||||
下面是完成这些的步骤。
|
||||
|
||||
#### 启用 SPI
|
||||
|
||||
树莓派上启用 SPI 最简单的方式是使用`raspi-config` 命令。SPI 总线允许串行数据通信与设备一起使用——在本例中,ePaper 显示:
|
||||
|
||||
|
||||
```
|
||||
`$ sudo raspi-config`
|
||||
```
|
||||
|
||||
从弹出的菜单中, 选择 **Interfacing Options** -> **SPI** -> **Yes** 来启用 SPI 接口,然后启动。
|
||||
|
||||
#### 安装 BCM2835 库
|
||||
|
||||
如上所述,BCM2835 库是用在树莓派 Broadcom BCM2385 芯片的软件,它允许访问 GPIO 引脚来控制设备。
|
||||
|
||||
在我写这篇文章之时,用于树莓派的最新 Broadcom BCM2385 库版本是 v1.68 。安装此库需要下载软件压缩包然后使用 `make` 来安装:
|
||||
|
||||
|
||||
```
|
||||
# 下载 BCM2853 库并解压
|
||||
$ curl -sSL <http://www.airspayce.com/mikem/bcm2835/bcm2835-1.68.tar.gz> -o - | tar -xzf -
|
||||
|
||||
# 进入解压后的文件夹
|
||||
$ pushd bcm2835-1.68/
|
||||
|
||||
# 配置、检查并安装 BCM2853 库
|
||||
$ sudo ./configure
|
||||
$ sudo make check
|
||||
$ sudo make install
|
||||
|
||||
# 返回上级目录
|
||||
$ popd
|
||||
```
|
||||
|
||||
#### 安装需要的 Python 库
|
||||
|
||||
你用 Python 控制 ePaper 显示器需要安装 Python 库 `RPi.GPIO` ,还需要 `python3-pil` 包画图。显然, PIL 包已经不行了, Pillow 可以作为代替方案。我还没有为该项目测试 Pillow ,但它可行:
|
||||
|
||||
|
||||
```
|
||||
# 安装需要的 Python 库
|
||||
$ sudo apt-get update
|
||||
$ sudo apt-get install python3-pip python3-pil
|
||||
$ sudo pip3 install RPi.GPIO
|
||||
```
|
||||
|
||||
_注意:这些是 Python3 的指令。你可以在 WaveShare 网站查到 Python2 的指令。_
|
||||
|
||||
#### 下载 WaveShare 示例和 Python 库
|
||||
|
||||
Waveshare 维护一个 Python 和 C 的 Git 库,用于使用其 ePaper 显示器和一些展示如何使用它们的示例。对这个倒计时时钟而言,你需要克隆这个库并用于 2.13 英寸的显示器:
|
||||
|
||||
```
|
||||
# 克隆这个 WaveShare e-Paper git 库
|
||||
$ git clone <https://github.com/waveshare/e-Paper.git>
|
||||
```
|
||||
|
||||
如果你用不同的显示器或者其他公司产品,需要使用适配软件。
|
||||
|
||||
Waveshare 提供了很多指导:
|
||||
|
||||
* [WaveShare ePaper 设置指导][9]
|
||||
* [WaveShare ePaper 库安装指导][10]
|
||||
|
||||
|
||||
|
||||
#### 获得有趣的字体(选做)
|
||||
|
||||
你可以随心所欲的使用显示器,为什么不搞点花样?找一个炫酷的字体!
|
||||
|
||||
这有大量 [开放字体许可][11] 的字体可用。我十分喜爱 Bangers 字体。如果你看过 YouTube 那你见过这种字体了,它十分流行。你可以下载到本地的共享字体目录文件中,并且所有的应用都可以使用,包括这个项目:
|
||||
|
||||
```
|
||||
# “Bangers” 字体是 Vernon Adams 用 Google 字体开放许可授权的字体
|
||||
$ mkdir -p ~/.local/share/fonts
|
||||
$ curl -sSL <https://github.com/google/fonts/raw/master/ofl/bangers/Bangers-Regular.ttf> -o fonts/Bangers-Regular.ttf
|
||||
```
|
||||
|
||||
### 创建一个 Pi Day 倒计时器
|
||||
|
||||
现在你已经安装好了软件,可以使用带有炫酷字体的 ePaper 显示器了。你可以创建一个有趣的项目:倒计时到下一个 Pi Day !
|
||||
|
||||
如果你想,你可以从该项目的 [GitHub repo][13] 直接下载 [countdown.py][12] 这个 Python 文件并跳到文章结尾。
|
||||
|
||||
为了满足大家的好奇心,我将逐步讲解。
|
||||
|
||||
#### 导入一些库
|
||||
|
||||
|
||||
```
|
||||
#!/usr/bin/python3
|
||||
# -*- coding:utf-8 -*-
|
||||
import logging
|
||||
import os
|
||||
import sys
|
||||
import time
|
||||
|
||||
from datetime import datetime
|
||||
from pathlib import Path
|
||||
from PIL import Image,ImageDraw,ImageFont
|
||||
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
|
||||
basedir = Path(__file__).parent
|
||||
waveshare_base = basedir.joinpath('e-Paper', 'RaspberryPi_JetsonNano', 'python')
|
||||
libdir = waveshare_base.joinpath('lib')
|
||||
```
|
||||
|
||||
开始先导入一些标准库之后脚本中用。也需要你添加一些 PIL 的包: `Image`, `ImageDraw` ,和 `ImageFont` ,你会 用到这些包来画一些简单的图形。最后,为包含用于 2.13 英寸显示器的 Waveshare Python 库的本地 `lib` 目录设置一些变量,稍后你可以使用这些变量从本地目录加载库。
|
||||
|
||||
#### 字体大小辅助函数
|
||||
|
||||
下一部分是为你选择的字体建立一个修改大小的辅助函数: Bangers-Regular.ttf 。该函数将整型变量作为大小参数并返回一个图形字体对象来用于显示:
|
||||
|
||||
```
|
||||
def set_font_size(font_size):
|
||||
logging.info("Loading font...")
|
||||
return ImageFont.truetype(f"{basedir.joinpath('Bangers-Regular.ttf').resolve()}", font_size)
|
||||
```
|
||||
|
||||
#### 倒计时逻辑
|
||||
|
||||
接下来是计算这个项目的一个函数:距下次 Pi Day 还有多久。如果 Pi Day 在一月,那么计算剩余天数将很简单。但是你需要考虑是否今年的 Pi Day 这一天已经过去了。如果是这样的话,那么计算量将会很大:
|
||||
|
||||
|
||||
```
|
||||
def countdown(now):
|
||||
piday = datetime(now.year, 3, 14)
|
||||
|
||||
# 如果错过了就增加一年
|
||||
if piday < now:
|
||||
piday = datetime((now.year + 1), 3, 14)
|
||||
|
||||
days = (piday - now).days
|
||||
|
||||
logging.info(f"Days till piday: {days}")
|
||||
return day
|
||||
```
|
||||
|
||||
#### 主函数
|
||||
|
||||
最后,到了主函数,需要初始化显示器并向它写数据。这时,你应该写一个欢迎语然后再开始倒计时。但是首先,你需要加载 Waveshare 库:
|
||||
|
||||
|
||||
```
|
||||
def main():
|
||||
|
||||
if os.path.exists(libdir):
|
||||
sys.path.append(f"{libdir}")
|
||||
from waveshare_epd import epd2in13_V2
|
||||
else:
|
||||
logging.fatal(f"not found: {libdir}")
|
||||
sys.exit(1)
|
||||
```
|
||||
|
||||
上面的代码片段检查以确保该库已下载到倒计时脚本旁边的目录中,然后加载“epd2in13_V2”库。 如果你使用不同的显示器,则需要使用不同的库。 如果你愿意,也可以自己编写。我发现阅读 Waveshare 随显示器提供的 Python 代码很有趣,它比我想象的要简单得多。
|
||||
|
||||
下一段代码创建一个 EPD( ePaper 显示器)对象以与显示器交互并初始化硬件:
|
||||
|
||||
```
|
||||
logging.info("Starting...")
|
||||
try:
|
||||
# 创建一个显示对象
|
||||
epd = epd2in13_V2.EPD()
|
||||
|
||||
# 初始化并清空显示
|
||||
# ePaper 保持它的状态处分更新
|
||||
logging.info("Initialize and clear...")
|
||||
epd.init(epd.FULL_UPDATE)
|
||||
epd.Clear(0xFF)
|
||||
```
|
||||
|
||||
关于 ePaper 的一个有趣之处:它仅在将像素从白色变为黑色或从黑色变为白色时才使用电源。这意味着当设备断电或应用程序因任何原因停止时,屏幕上的任何内容都会保留下来。从功耗的角度来看,这很好,但这也意味着您需要在启动时清除显示,否则您的脚本只会覆盖屏幕上已有的内容。 因此,`epd.Clear(0xFF)` 用于在脚本启动时清除显示。
|
||||
|
||||
接下来,创建一个“画布”来绘制剩余的显示输出:
|
||||
|
||||
|
||||
```
|
||||
# 创建一个图形对象
|
||||
# 注意:"epd.heigh" 是屏幕的长边
|
||||
# 注意:"epd.width" 是屏幕的短边
|
||||
# 真是反直觉…
|
||||
logging.info(f"Creating canvas - height: {epd.height}, width: {epd.width}")
|
||||
image = Image.new('1', (epd.height, epd.width), 255) # 255: clear the frame
|
||||
draw = ImageDraw.Draw(image)
|
||||
```
|
||||
|
||||
这与显示器的宽度和高度相匹配——但它有点反直觉,因为显示器的短边是宽度。我认为长边是宽度,所以这只是需要注意的一点。 请注意,`epd.height` 和 `epd.width` 由 Waveshare 库设置以对应于你使用的设备。
|
||||
|
||||
#### 欢迎语
|
||||
|
||||
接下来,你将开始画一些画。这涉及在你之前创建的“画布”对象上设置数据。这还没有将它绘制到 ePaper 显示器上——你现在只是在构建你想要的图像。由你为这个项目绘制带有一块馅饼的图像,来创建一个庆祝 Pi Day 的欢迎信息:
|
||||
|
||||
![画一块馅饼][14]
|
||||
|
||||
(Chris Collins, [CC BY-SA 4.0][15])
|
||||
|
||||
很可爱,不是吗?
|
||||
|
||||
|
||||
```
|
||||
logging.info("Set text text...")
|
||||
bangers64 = set_font_size(64)
|
||||
draw.text((0, 30), 'PI DAY!', font = bangers64, fill = 0)
|
||||
|
||||
logging.info("Set BMP...")
|
||||
bmp = Image.open(basedir.joinpath("img", "pie.bmp"))
|
||||
image.paste(bmp, (150,2))
|
||||
```
|
||||
最后,_最后_,你可以展示你画的图画:
|
||||
|
||||
```
|
||||
logging.info("Display text and BMP")
|
||||
epd.display(epd.getbuffer(image))
|
||||
```
|
||||
|
||||
That bit above updates the display to show the image you drew.
|
||||
|
||||
接下来,准备另一幅图像展示你的倒计时:
|
||||
|
||||
#### Pi Day 倒计时
|
||||
首先,创建一个用来展示倒计时的项目。也需要设置数字的字体大小:
|
||||
|
||||
|
||||
```
|
||||
logging.info("Pi Date countdown; press CTRL-C to exit")
|
||||
piday_image = Image.new('1', (epd.height, epd.width), 255)
|
||||
piday_draw = ImageDraw.Draw(piday_image)
|
||||
|
||||
# 设置字体大小
|
||||
bangers36 = set_font_size(36)
|
||||
bangers64 = set_font_size(64)
|
||||
```
|
||||
|
||||
为了使它显示的时候更像一个倒计时,更新图像的一部分是更加有效的手段,仅更改已经改变的显示数据部分。下面的代码准备以这样方式运行:
|
||||
|
||||
|
||||
```
|
||||
# 准备更新显示
|
||||
epd.displayPartBaseImage(epd.getbuffer(piday_image))
|
||||
epd.init(epd.PART_UPDATE)
|
||||
```
|
||||
|
||||
最后,需要计时,开始一个无限循环来检查据下次 Pi Day 还有多久并显示在 ePaper上。如果到了 Pi Day ,你可以输出一些庆祝短语:
|
||||
|
||||
|
||||
```
|
||||
while (True):
|
||||
days = countdown(datetime.now())
|
||||
unit = get_days_unit(days)
|
||||
|
||||
# 通过绘制一个填充有白色的矩形来清除屏幕的下半部分
|
||||
piday_draw.rectangle((0, 50, 250, 122), fill = 255)
|
||||
|
||||
# 绘制页眉
|
||||
piday_draw.text((10,10), "Days till Pi-day:", font = bangers36, fill = 0)
|
||||
|
||||
if days == 0:
|
||||
# 绘制庆祝语
|
||||
piday_draw.text((0, 50), f"It's Pi Day!", font = bangers64, fill = 0)
|
||||
else:
|
||||
# 绘制距下一次 Pi Day 的时间
|
||||
piday_draw.text((70, 50), f"{str(days)} {unit}", font = bangers64, fill = 0)
|
||||
|
||||
# 渲染屏幕
|
||||
epd.displayPartial(epd.getbuffer(piday_image))
|
||||
time.sleep(5)
|
||||
```
|
||||
|
||||
脚本最后做了一些错误处理,包括捕获键盘中断,这样你可以使用 **Ctrl**+**C** 来结束无限循环,以及一个根据计数来打印 'day' 或 'days' 的函数:
|
||||
|
||||
```
|
||||
except IOError as e:
|
||||
logging.info(e)
|
||||
|
||||
except KeyboardInterrupt:
|
||||
logging.info("Exiting...")
|
||||
epd.init(epd.FULL_UPDATE)
|
||||
epd.Clear(0xFF)
|
||||
time.sleep(1)
|
||||
epd2in13_V2.epdconfig.module_exit()
|
||||
exit()
|
||||
|
||||
def get_days_unit(count):
|
||||
if count == 1:
|
||||
return "day"
|
||||
|
||||
return "days"
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
```
|
||||
|
||||
现在你已经拥有一个倒计时脚本并显示剩余天数!这是在我的树莓派上的显示(视频经过加速,我没有足够的磁盘空间来保存一整天的视频):
|
||||
|
||||
![Pi Day Countdown Timer In Action][16]
|
||||
|
||||
(Chris Collins, [CC BY-SA 4.0][15])
|
||||
|
||||
#### 安装 systemd 服务(选做)
|
||||
|
||||
如果你希望在系统打开时运行倒计时显示并且无需登录并运行脚本,您可以将可选的 systemd 单元安装为 [systemd 用户服务][17].
|
||||
|
||||
将 GitHub 上的 [piday.service][18] 文件复制到 `${HOME}/.config/systemd/user`,如果该目录不存在,请先创建该目录。然后你可以启用该服务并启动它:
|
||||
|
||||
|
||||
```
|
||||
$ mkdir -p ~/.config/systemd/user
|
||||
$ cp piday.service ~/.config/systemd/user
|
||||
$ systemctl --user enable piday.service
|
||||
$ systemctl --user start piday.service
|
||||
|
||||
# Enable lingering, to create a user session at boot
|
||||
# and allow services to run after logout
|
||||
$ loginctl enable-linger $USER
|
||||
```
|
||||
|
||||
该脚本将输出到 systemd 日志,可以使用 `journalctl` 命令查看输出。
|
||||
|
||||
### 它开始看起来很像 Pi Day !
|
||||
|
||||
现在你拥有了一个树莓派 Zero W 显示在 ePaper显示器上的 Pi Day 倒计时器!并在系统启动时使用 systemd 单元文件启动!现在只有 350 天左右我们才可以再次相聚庆祝奇妙的设备———树莓派。通过我们的小项目,我们可以一目了然地看到确切的天数。
|
||||
|
||||
但事实上,任何人都可以全年都在心中举行 Pi Day,因此请享受使用自己的树莓派创建一些有趣且具有教育意义的项目吧!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/21/3/raspberry-pi-countdown-clock
|
||||
|
||||
作者:[Chris Collins][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[Donkey](https://github.com/Donkey-Hao)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/clcollins
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/clocks_time.png?itok=_ID09GDk (Alarm clocks with different time)
|
||||
[2]: https://en.wikipedia.org/wiki/Pi_Day
|
||||
[3]: https://opensource.com/tags/raspberry-pi
|
||||
[4]: https://www.raspberrypi.org/products/raspberry-pi-zero-w/
|
||||
[5]: https://opensource.com/article/21/3/troubleshoot-wifi-go-raspberry-pi
|
||||
[6]: https://www.waveshare.com/product/displays/e-paper.htm
|
||||
[7]: https://www.raspberrypi.org/software/operating-systems/
|
||||
[8]: https://pypi.org/project/Pillow/
|
||||
[9]: https://www.waveshare.com/wiki/2.13inch_e-Paper_HAT
|
||||
[10]: https://www.waveshare.com/wiki/Libraries_Installation_for_RPi
|
||||
[11]: https://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL
|
||||
[12]: https://github.com/clcollins/epaper-pi-ex/blob/main/countdown.py
|
||||
[13]: https://github.com/clcollins/epaper-pi-ex/
|
||||
[14]: https://opensource.com/sites/default/files/uploads/pie.png (drawing of a piece of pie)
|
||||
[15]: https://creativecommons.org/licenses/by-sa/4.0/
|
||||
[16]: https://opensource.com/sites/default/files/uploads/piday_countdown.gif (Pi Day Countdown Timer In Action)
|
||||
[17]: https://wiki.archlinux.org/index.php/systemd/User
|
||||
[18]: https://github.com/clcollins/epaper-pi-ex/blob/main/piday.service
|
@ -0,0 +1,297 @@
|
||||
[#]: subject: "Learn the Lisp programming language in 2021"
|
||||
[#]: via: "https://opensource.com/article/21/5/learn-lisp"
|
||||
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "lkxed"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
一起来学习 Lisp 编程语言吧!
|
||||
======
|
||||
许多大型代码库中都有 Lisp 代码的身影,因此,熟悉一下这门语言是一个明智之举。
|
||||
|
||||
![科技和计算领域的女性][1]
|
||||
|
||||
图源:kris krüg
|
||||
|
||||
Lisp 在 1958 年就被发明出来了,它是世界上第二老的计算机编程语言(LCTT 译注:最老的是 Fortran,诞生于 1957 年)。它有许多现代的衍生品,包括 Common Lisp、Emacs Lisp(Elisp)、Clojure、Racket、Scheme、Fennel 和 GNU Guile 等。
|
||||
|
||||
那些喜欢思考编程语言设计的人,往往都喜欢 Lisp,因为它的语法和数据有者相同的结构:Lisp 代码实际上是<ruby>一个列表的列表<rt>a list of lists</rt></ruby>,它的名字其实是 <ruby>“列表处理”<rt>LISt Processing</rt></ruby> 的首字母缩写。那些喜欢思考编程语言美学的人,往往都讨厌 Lisp,因为它经常使用括号来定义范围;事实上,编程界也有一个广为流传的笑话:Lisp 代表的其实是 <ruby>“大量烦人的多余括号”<rt>Lots of Irritating Superfluous Parentheses</rt></ruby>。
|
||||
|
||||
不管你是喜欢还是讨厌 Lisp 的设计哲学,你都不得不承认,它都是一门有趣的语言,过去如此,现在亦然(这得归功于现代方言 Clojure 和 Guile)。你可能会感到惊讶,但事实就是,Lisp 在任何行业的大型代码库中都占有一席之地。因此,现在开始学习 Lisp,至少熟悉一下它,不失为一个好主意。
|
||||
|
||||
### 安装 Lisp
|
||||
|
||||
Lisp 有很多不同的实现。比较流行的开源版本有 [SBCL][2]、[GNU Lisp][3] 和 [GNU Common Lisp][4](GCL)。你可以使用发行版的包管理器安装它们中的任意一个,在本文中,我是用的是 `clisp`(LCTT 译注:也就是 GNU Lisp,一种 ANSI Common Lisp 的实现)。
|
||||
|
||||
以下是在不同的 Linux 发行版中安装 `clisp` 的步骤。
|
||||
|
||||
在 Fedora Linux 上,使用 `dnf`:
|
||||
|
||||
```
|
||||
$ sudo dnf install clisp
|
||||
```
|
||||
|
||||
在 Debian 上,使用 `apt`:
|
||||
|
||||
```
|
||||
$ sudo apt install clisp
|
||||
```
|
||||
|
||||
在 macOS 上,使用 [MacPorts][5] 或者 [Homebrew][6]:
|
||||
|
||||
```
|
||||
# 使用 MacPorts
|
||||
$ sudo port install clisp
|
||||
|
||||
# 使用 Homebrew
|
||||
$ brew install clisp
|
||||
```
|
||||
|
||||
在 Windows 上,你可以使用 [clisp on Cygwin][7] 或者从 [gnu.org/software/gcl][8] 上下载 GCL 的二进制文件。
|
||||
|
||||
虽然我使用 `clisp` 命令来运行 Lisp 代码,但是本文中涉及到的大多数语法规则,对任何 Lisp 实现都是适用的。如果你选择使用一个不同的 Lisp 实现,除了用来运行 Lisp 代码的命令会和我不一样外(比如,你可能要用 `gcl` 或 `sbcl` 而不是 `clisp`),其它的所有东西都是相同的。
|
||||
|
||||
### 列表处理
|
||||
|
||||
Lisp 源代码的基本单元是 <ruby>“表达式”<rt>expression</rt></ruby>,它在形式上是一个列表。举个例子,下面就是一个列表,它由一个操作符(`+`)和两个整数(`1` 和 `2`)组成的:
|
||||
|
||||
```
|
||||
(+ 1 2)
|
||||
```
|
||||
|
||||
同时,它也是一个 Lisp 表达式,内容是一个符号(`+`,会被解析成一个加法函数)和它的两个参数(`1` 和 `2`)。你可以在 Common Lisp 的交互式环境(即 REPL)中运行该表达式和其它表达式。如果你熟悉 Python 的 IDLE,那么你应该会对 Lisp 的 REPL 感到亲切。(LCTT 译注:REPL 的全称是 “Read-Eval-Print Loop”,意思是 “‘读取-求值-输出’循环”,这个名字很好地描述了它的工作过程。)
|
||||
|
||||
要进入到 REPL 中,只需运行 Common Lisp 即可:
|
||||
|
||||
```
|
||||
$ clisp
|
||||
[1]>
|
||||
```
|
||||
|
||||
在 REPL 提示符中,尝试输入一些表达式:
|
||||
|
||||
```
|
||||
[1]> (+ 1 2)
|
||||
3
|
||||
[2]> (- 1 2)
|
||||
-1
|
||||
[3]> (- 2 1)
|
||||
1
|
||||
[4]> (+ 2 3 4)
|
||||
9
|
||||
```
|
||||
|
||||
### 函数
|
||||
|
||||
在了解了 Lisp 表达式的基本结构后,你可以使用函数来做更多有用的事。譬如,`print` 函数可以接受任意数量的参数,然后把它们都显示在你的终端上,`pprint` 函数还可以实现格式化打印。还有更多不同的打印函数,不过,`pprint` 在 REPL 中的效果还挺好的:
|
||||
|
||||
```
|
||||
[1]> (pprint "hello world")
|
||||
|
||||
"hello world"
|
||||
|
||||
[2]>
|
||||
```
|
||||
|
||||
你可以使用 `defun` 函数来创建一个自定义函数。`defun` 函数需要你提供自定义函数的名称,以及它接受的参数列表:
|
||||
|
||||
```
|
||||
[1]> (defun myprinter (s) (pprint s))
|
||||
MYPRINTER
|
||||
[2]> (myprinter "hello world")
|
||||
|
||||
"hello world"
|
||||
|
||||
[3]>
|
||||
```
|
||||
|
||||
### 变量
|
||||
|
||||
你可以使用 `setf` 函数来在 Lisp 中创建变量:
|
||||
|
||||
```
|
||||
[1]> (setf foo "hello world")
|
||||
"hello world"
|
||||
[2]> (pprint foo)
|
||||
|
||||
"hello world"
|
||||
|
||||
[3]>
|
||||
```
|
||||
|
||||
你可以往表达式里嵌套表达式(就像使用某种管道一样)。举个例子,你可以先使用 `string-upcase` 函数,把某个字符串的所有字符转换成大写,然后再使用 `pprint` 函数,将它的内容格式化打印到终端上:
|
||||
|
||||
```
|
||||
[3]> (pprint (string-upcase foo))
|
||||
|
||||
"HELLO WORLD"
|
||||
|
||||
[4]>
|
||||
```
|
||||
|
||||
Lisp 是动态类型语言,这意味着,你在给变量赋值时不需要声明它的类型。Lisp 默认会把整数当作整数来处理:
|
||||
|
||||
```
|
||||
[1]> (setf foo 2)
|
||||
[2]> (setf bar 3)
|
||||
[3]> (+ foo bar)
|
||||
5
|
||||
```
|
||||
|
||||
如果你想让整数被当作字符串来处理,你可以给它加上引号:
|
||||
|
||||
|
||||
```
|
||||
[4]> (setf foo "2")
|
||||
"2"
|
||||
[5]> (setf bar "3")
|
||||
"3"
|
||||
[6]> (+ foo bar)
|
||||
|
||||
*** - +: "2" is not a number
|
||||
The following restarts are available:
|
||||
USE-VALUE :R1 Input a value to be used instead.
|
||||
ABORT :R2 Abort main loop
|
||||
Break 1 [7]>
|
||||
```
|
||||
|
||||
在这个示例 REPL 会话中,变量 `foo` 和 `bar` 都被赋值为加了引号的数字,因此,Lisp 会把它们当作字符串来处理。数学运算符不能够用在字符串上,因此 REPL 进入了调试器模式。想要跳出这个调试器,你需要按下 `Ctrl+D` 才行(LCTT 译注:就 `clisp` 而言,使用 `quit` 关键字也可以退出)。
|
||||
|
||||
你可以使用 `typep` 函数对一些对象进行类型检查,它可以测试对象是否为某个特定数据类型。返回值 `T` 和 `NIL` 分别代表 `True` 和 `False`。
|
||||
|
||||
```
|
||||
[4]> (typep foo 'string)
|
||||
NIL
|
||||
[5]> (typep foo 'integer)
|
||||
T
|
||||
```
|
||||
|
||||
`string` 和 `integer` 前面加上了一个单引号(`'`),这是为了防止 Lisp(错误地)把这两个单词当作是变量来求值:
|
||||
|
||||
```
|
||||
[6]> (typep foo string)
|
||||
*** - SYSTEM::READ-EVAL-PRINT: variable STRING has no value
|
||||
[...]
|
||||
```
|
||||
|
||||
这是一种保护某些术语(LCTT 译注:类似于字符串转义)的简便方法,正常情况下它是用 `quote` 函数来实现的:
|
||||
|
||||
```
|
||||
[7]> (typep foo (quote string))
|
||||
NIL
|
||||
[5]> (typep foo (quote integer))
|
||||
T
|
||||
```
|
||||
|
||||
### 列表
|
||||
|
||||
不出人意料,你当然也可以在 Lisp 中创建列表:
|
||||
|
||||
```
|
||||
[1]> (setf foo (list "hello" "world"))
|
||||
("hello" "world")
|
||||
```
|
||||
|
||||
你可以使用 `nth` 函数来索引列表:
|
||||
|
||||
```
|
||||
[2]> (nth 0 foo)
|
||||
"hello"
|
||||
[3]> (pprint (string-capitalize (nth 1 foo)))
|
||||
|
||||
"World"
|
||||
```
|
||||
|
||||
### 退出 REPL
|
||||
|
||||
要结束一个 REPL 会话,你需要按下键盘上的 `Ctrl+D`,或者是使用 Lisp 的 `quit` 关键字:
|
||||
|
||||
```
|
||||
[99]> (quit)
|
||||
$
|
||||
```
|
||||
|
||||
### 编写脚本
|
||||
|
||||
Lisp 可以被编译,也可以作为解释型的脚本语言来使用。在你刚开始学习的时候,后者很可能是最容易的选项,特别是当你已经熟悉 Python 或 [Shell 脚本][9] 时。
|
||||
|
||||
下面是一个用 Common Lisp 编写的简单的“掷骰子”脚本:
|
||||
|
||||
```
|
||||
#!/usr/bin/clisp
|
||||
|
||||
(defun roller (num)
|
||||
(pprint (random (parse-integer (nth 0 num))))
|
||||
)
|
||||
|
||||
(setf userput *args*)
|
||||
(setf *random-state* (make-random-state t))
|
||||
(roller userput)
|
||||
```
|
||||
|
||||
脚本的第一行注释告诉了你的 POSIX 终端,该使用什么可执行文件来运行这个脚本。
|
||||
|
||||
`roller` 函数使用 `defun` 函数创建,它在内部使用 `random` 函数来打印一个伪随机数,这个伪随机数严格小于 `num` 列表中下标为 0 的元素。在脚本中,这个 `num` 列表还没有被创建,不过没关系,因为只有当脚本被调用时,函数才会执行。
|
||||
|
||||
接下来的那一行,我们把运行脚本时提供的任意参数,都赋值给一个叫做 `userput` 的变量。这个 `userput` 变量是一个列表,当它被传递给 `roller` 函数后,它就会变成参数 `num`。
|
||||
|
||||
脚本的倒数第二行产生了一个“随机种子”。这为 Lisp 提供了足够的随机性来生成一个几乎随机的数字。
|
||||
|
||||
最后一行调用了自定义的 `roller` 函数,并将 `userput` 列表作为唯一的参数传递给它。
|
||||
|
||||
将这个文件保存为 `dice.lisp`,并赋予它可执行权限:
|
||||
|
||||
```
|
||||
$ chmod +x dice.lisp
|
||||
```
|
||||
|
||||
最后,运行它,并给它提供一个数字,以作为它选择随机数的最大值:
|
||||
|
||||
```
|
||||
$ ./dice.lisp 21
|
||||
|
||||
13
|
||||
$ ./dice.lisp 21
|
||||
|
||||
7
|
||||
$ ./dice.lisp 21
|
||||
|
||||
20
|
||||
```
|
||||
|
||||
看起来还不错!
|
||||
|
||||
你或许注意到,你的模拟骰子有可能会是 0,并且永远达不到你提供给它的最大值参数。换句话说,对于一个 20 面的骰子,这个脚本永远投不出 20(除非你把 0 当作 20)。有一个简单的解决办法,它只需要用到在本文中介绍的知识,你能够想到吗?
|
||||
|
||||
### 学习 Lisp
|
||||
|
||||
无论你是想将 Lisp 作为个人脚本的实用语言,还是为了助力你的职业生涯,抑或是仅仅作为一个有趣的实验,你都可以去看看一年一度(LCTT 译注:应该是两年一度)的 [Lisp <ruby>游戏果酱<rt>Game Jam</rt></ruby>][11],从而收获一些特别有创意的用途(其中的大多数提交都是开源的,因此你可以查看代码以从中学习)。
|
||||
|
||||
Lisp 是一门有趣而独特的语言,它有着不断增长的开发者用户群、足够悠久的历史和新兴的方言,因此,它有能力让从事各个行业的程序员都满意。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/21/5/learn-lisp
|
||||
|
||||
作者:[Seth Kenlon][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[lkxed](https://github.com/lkxed)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/seth
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://opensource.com/sites/default/files/lead-images/OSDC_women_computing_4.png
|
||||
[2]: http://sbcl.org
|
||||
[3]: http://clisp.org
|
||||
[4]: https://www.gnu.org/software/gcl/
|
||||
[5]: https://opensource.com/article/20/11/macports
|
||||
[6]: https://opensource.com/article/20/6/homebrew-linux
|
||||
[7]: https://cygwin.fandom.com/wiki/Clisp
|
||||
[8]: http://mirror.lagoon.nc/gnu/gcl/binaries/stable
|
||||
[9]: https://opensource.com/article/20/4/bash-programming-guide
|
||||
[10]: https://opensource.com/article/19/7/what-posix-richard-stallman-explains
|
||||
[11]: https://itch.io/jam/spring-lisp-game-jam-2021
|
187
translated/tech/20210722 Write your first JavaScript code.md
Normal file
187
translated/tech/20210722 Write your first JavaScript code.md
Normal file
@ -0,0 +1,187 @@
|
||||
[#]: subject: "Write your first JavaScript code"
|
||||
[#]: via: "https://opensource.com/article/21/7/javascript-cheat-sheet"
|
||||
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "lkxed"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
编写你的第一段 JavaScript 代码
|
||||
======
|
||||
JavaScript 是为 Web 而生的,但它可以做的事远不止于此。本文将带领你了解它的基础知识,然后你可以下载我们的备忘清单,以便随时掌握详细信息。
|
||||
|
||||
![开源编程][1]
|
||||
|
||||
图源:Opensource.com
|
||||
|
||||
JavaScript 是一种充满惊喜的编程语言。许多人第一次遇到 JavaScript 时,它通常是作为一种 Web 语言出现的。所有主流浏览器都有一个 JavaScript 引擎;并且,还有一些流行的框架,如 JQuery、Cash 和 Bootstrap 等,它们可以帮助简化网页设计;甚至还有用 JavaScript 编写的编程环境。它似乎在互联网上无处不在,但事实证明,它对于 [Electron][2] 等项目来说也是一种有用的语言。Electron 是一个构建跨平台桌面应用程序的开源工具包,它使用的语言就是 JavaScript。
|
||||
|
||||
JavaScript 语言的用途多到令人惊讶,它拥有各种各样的库,而不仅仅是用于制作网站。它的基础知识十分容易掌握,因此,它可以作为一个起点,助你跨出构建你想象中的东西的第一步。
|
||||
|
||||
### 安装 JavaScript
|
||||
|
||||
随着你的 JavaScript 水平不断提高,你可能会发现自己需要高级的 JavaScript 库和运行时。不过,刚开始学习的时候,你是根本不需要安装 JavaScript 的。因为所有主流的 Web 浏览器都包含一个 JavaScript 引擎来运行代码。你可以使用自己喜欢的文本编辑器编写 JavaScript,将其加载到 Web 浏览器中,接着你就能看到代码的作用。
|
||||
|
||||
### 上手 JavaScript
|
||||
|
||||
要编写你的第一个 JavaScript 代码,请打开你喜欢的文本编辑器,例如 [Notepad++][3]、[Atom][4] 或 [VSCode][5] 等。因为它是为 Web 开发的,所以 JavaScript 可以很好地与 HTML 配合使用。因此,我们先来尝试一些基本的 HTML:
|
||||
|
||||
```
|
||||
<html>
|
||||
<head>
|
||||
<title>JS</title>
|
||||
</head>
|
||||
<body>
|
||||
<p id="example">Nothing here.</p>
|
||||
</body>
|
||||
</html>
|
||||
```
|
||||
|
||||
保存这个文件,然后在 Web 浏览器中打开它。
|
||||
|
||||
![浏览器中显示的 HTML][6]
|
||||
|
||||
要将 JavaScript 添加到这个简单的 HTML 页面,你可以创建一个 JavaScript 文件并在页面的 `<head>` 中引用它,或者只需使用 `<script>` 标记将 JavaScript 代码嵌入 HTML 中。在这个例子中,我嵌入了下面的代码:
|
||||
|
||||
```
|
||||
<html>
|
||||
<head>
|
||||
<title>JS</title>
|
||||
</head>
|
||||
<body>
|
||||
<p id="example">Nothing here.</p>
|
||||
|
||||
<script>
|
||||
let myvariable = "Hello world!";
|
||||
|
||||
document.getElementById("example").innerHTML = myvariable;
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
```
|
||||
|
||||
在浏览器中重新加载页面。
|
||||
|
||||
![在浏览器中显示带有 JavaScript 的 HTML][7]
|
||||
|
||||
如你所见,`<p>` 标签仍然包含字符串 “Nothing here”,但是当它被渲染时,JavaScript 会改变它,使其包含 “Hello world”。是的,JavaScript 具有重建(或只是帮助构建)网页的能力。
|
||||
|
||||
这个简单脚本中的 JavaScript 做了两件事。首先,它创建一个名为 `myvariable` 的变量,并将字符串 “Hello world!” 放置其中。然后,它会在当前文档(浏览器呈现的网页)中搜索 ID 为 “example” 的所有 HTML 元素。当它找到 `example` 时,它使用了 `innerHTML` 函数将 HTML 元素的内容替换为 `myvariable` 的内容。
|
||||
|
||||
当然,我们也可以不用自定义变量。因为,使用动态创建的内容来填充 HTML 元素也是容易的。例如,你可以使用当前时间戳来填充它:
|
||||
|
||||
```
|
||||
<html>
|
||||
<head>
|
||||
<title>JS</title>
|
||||
</head>
|
||||
<body>
|
||||
<p id="example">Date and time appears here.</p>
|
||||
|
||||
<script>
|
||||
document.getElementById("example").innerHTML = Date();
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
```
|
||||
|
||||
重新加载页面,你就可以看到在呈现页面时生成的时间戳。再重新加载几次,你可以观察到秒数会不断增加。
|
||||
|
||||
### JavaScript 语法
|
||||
|
||||
在编程中,<ruby>语法<rt>syntax</rt></ruby> 指的是如何编写句子(或“行”)的规则。在 JavaScript 中,每行代码必须以分号(`;`)结尾,以便运行代码的 JavaScript 引擎知道何时停止阅读。(LCTT 译注:从实用角度看,此处的“必须”其实是不正确的,大多数 JS 引擎都支持不加分号。Vue.js 的作者尤雨溪认为“没有应该不应该,只有你自己喜欢不喜欢”,他同时表示,“Vue.js 的代码全部不带分号”。详情可以查看他在知乎上对于此问题的 [回答][10]。)
|
||||
|
||||
单词(或 <ruby>“字符串”<rt>strings</rt></ruby>)必须用引号(`"`)括起来,而数字(或 <ruby>“整数”<rt>integers</rt></ruby>)则不用。
|
||||
|
||||
几乎所有其他东西都是 JavaScript 语言的约定,例如变量、数组、条件语句、对象、函数等等。
|
||||
|
||||
### 在 JavaScript 中创建变量
|
||||
|
||||
变量是数据的容器。你可以将变量视为一个盒子,你在其中放置数据,以便与程序的其他部分共享它。要在 JavaScript 中创建变量,你可以选用关键字 `let` 和 `var` 中的一个,请根据你打算如何使用变量来选择:`var` 关键字用于创建一个供整个程序使用的变量,而 `let` 只为特定目的创建变量,通常在函数或循环的内部使用。(LCTT 译注:还有 `const` 关键字,它用于创建一个常量。)
|
||||
|
||||
JavaScript 内置的 `typeof` 函数可以帮助你识别变量包含的数据的类型。使用第一个示例,你可以修改显示文本,来显示 `myvariable` 包含的数据的类型:
|
||||
|
||||
```
|
||||
<string>
|
||||
let myvariable = "Hello world!";
|
||||
document.getElementById("example").innerHTML = typeof(myvariable);
|
||||
</string>
|
||||
```
|
||||
|
||||
接着,你就会发现 Web 浏览器中显示出 “string” 字样,因为该变量包含的数据是 “Hello world!”。在 `myvariable` 中存储不同类型的数据(例如整数),浏览器就会把不同的数据类型打印到示例网页上。尝试将 `myvariable` 的内容更改为你喜欢的数字,然后重新加载页面。
|
||||
|
||||
### 在 JavaScript 中创建函数
|
||||
|
||||
编程中的函数是独立的数据处理器。正是它们使编程得以 *模块化*。因为函数的存在,程序员可以编写通用库,例如,调整图像大小或统计时间花费的库,以供其他和你一样的程序员在他们的代码中使用。
|
||||
|
||||
要创建一个函数,你可以为函数提供一个自定义名称,后面跟着用大括号括起来的、任意数量的代码。
|
||||
|
||||
下面是一个简单的网页,其中包含了一个剪裁过的图像,还有一个分析图像并返回真实图像尺寸的按钮。在这个示例代码中,`<button>` 这个 HTML 元素使用了 JavaScript 的内置函数 `onclick` 来检测用户交互,它会触发一个名为 `get_size` 的自定义函数。具体代码如下:
|
||||
|
||||
```
|
||||
<html>
|
||||
<head>
|
||||
<title>Imager</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div>
|
||||
<button onclick="get_size(document.getElementById('myimg'))">
|
||||
Get image size
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<img style="width: 15%" id="myimg" src="penguin.png" />
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function get_size(i) {
|
||||
let w = i.naturalWidth;
|
||||
let h = i.naturalHeight;
|
||||
alert(w + " by " + h);
|
||||
}
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
```
|
||||
|
||||
保存这个文件,并将其加载到 Web 浏览器中以尝试这段代码。
|
||||
|
||||
![自定义的 get_size 函数返回了图像尺寸][8]
|
||||
|
||||
### 使用 JavaScript 的跨平台应用程序
|
||||
|
||||
你可以从代码示例中看到,JavaScript 和 HTML 紧密协作,从而创建了有凝聚力的用户体验。这是 JavaScript 的一大优势。当你使用 JavaScript 编写代码时,你继承了现代计算中最常见的用户界面之一,而它与平台无关,那就是 Web 浏览器。你的代码本质上是跨平台的,因此你的应用程序,无论是简单的图像大小分析器还是复杂的图像编辑器、视频游戏,或者你梦想的任何其他东西,都可以被所有人使用,无论是通过 Web 浏览器,还是桌面(如果你同时提供了一个 Electron 应用)。
|
||||
|
||||
学习 JavaScript 既简单又有趣。网络上有很多网站提供了相关教程,还有超过一百万个 JavaScript 库可帮助你与设备、外围设备、物联网、服务器、文件系统等进行交互。在你学习的过程中,请将我们的 [JavaScript 备忘单][9] 放在身边,以便记住语法和结构的细节。
|
||||
|
||||
正文中的配图来自:Seth Kenlon,CC BY-SA 4.0
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/21/7/javascript-cheat-sheet
|
||||
|
||||
作者:[Seth Kenlon][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[lkxed](https://github.com/lkxed)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/seth
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://opensource.com/sites/default/files/lead-images/code2.png
|
||||
[2]: https://www.electronjs.org/
|
||||
[3]: https://opensource.com/article/16/12/notepad-text-editor
|
||||
[4]: https://opensource.com/article/20/12/atom
|
||||
[5]: https://opensource.com/article/20/6/open-source-alternatives-vs-code
|
||||
[6]: https://opensource.com/sites/default/files/pictures/plain-html.jpg
|
||||
[7]: https://opensource.com/sites/default/files/uploads/html-javascript.jpg
|
||||
[8]: https://opensource.com/sites/default/files/uploads/get-size.jpg
|
||||
[9]: https://opensource.com/downloads/javascript-cheat-sheet
|
||||
[10]: https://www.zhihu.com/question/20298345/answer/49551142
|
@ -1,120 +0,0 @@
|
||||
[#]: subject: "How to Recover Arch Linux Install via chroot"
|
||||
[#]: via: "https://www.debugpoint.com/2021/07/recover-arch-linux/"
|
||||
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
如何通过 chroot 恢复 Arch Linux 的安装
|
||||
======
|
||||
这个快速指南解释了恢复 Arch Linux 安装的一些步骤。
|
||||
|
||||
作为一个滚动发布的版本,[Arch Linux][1] 中有时会出现一些问题。不是因为你自己的行为,而是数以百计的其他原因,如新内核与你的硬件,或软件的兼容性。但是,Arch Linux 仍然是更好的,它提供了最新的软件包和应用。
|
||||
|
||||
但有时,它也会给你带来麻烦,你最终只能看到一个闪烁的光标,其他什么都没有。
|
||||
|
||||
所以,在这种情况下,与其重新格式化或重新安装,不如在放弃希望之前尝试恢复安装和数据。本指南概述了这个方向的一些步骤。
|
||||
|
||||
### 恢复 Arch Linux 安装
|
||||
|
||||
* 第一步是用 Arch Linux 创建一个可启动的 Live USB。从这个链接下载 .ISO 并创建一个可启动的 .ISO。你可以查看这个指南[如何使用 Etcher 创建可启动的 .ISO][2]。记住这一步需要另一个稳定的工作系统,因为你目前的系统不能使用。
|
||||
|
||||
[下载 arch linux][3]
|
||||
|
||||
* 你需要知道你的 Arch Linux 安装在哪个分区上。这是一个非常重要的步骤。如果你不知道,你可以用 GParted 来查找。或者在你的 Grub 菜单中查看,或者你可以运行下面的命令来了解。这将列出你所有的磁盘分区及其大小、标签。
|
||||
|
||||
```
|
||||
sudo lsblk -o name,mountpoint,label,size,uuid
|
||||
```
|
||||
|
||||
* 完成后,插入 U 盘并从它启动。你应该在 Live 介质中看到 Arch Linux 的提示。
|
||||
|
||||
* 现在,用下面的方法挂载到 Arch Linux 分区。把 /dev/sda3 改成你各自的分区。
|
||||
|
||||
```
|
||||
/dev/sda3
|
||||
```
|
||||
|
||||
```
|
||||
mount /dev/sda3 /mntarch-chroot /mnt
|
||||
```
|
||||
|
||||
* arch-chroot 命令将在终端挂载你的 Arch Linux 分区,所以用你的 Arch 凭证登录。现在,在这个阶段,根据你的需要,你有以下选择。
|
||||
|
||||
* 你可以通过 /home 文件夹来备份你的数据。如果,故障排除器无效的话。你可以把文件复制到外部 USB 或其他分区。
|
||||
|
||||
* 核查日志文件,特别是 pacman 日志。因为,不稳定的系统可能是由升级某些软件包引起的,如图形驱动或任何其他驱动。根据日志,如果你想降级任何特定的软件包,你可能要降级。
|
||||
|
||||
* 你可以使用下面的命令来查看 pacman 日志文件的最后 200 行,以找出任何失败的项目或依赖性删除。
|
||||
|
||||
```
|
||||
tail -n 200 /var/log/pacman.log | less
|
||||
```
|
||||
|
||||
* 上面的命令给了你从 pacman.log 文件末尾的 200 行来验证。现在,仔细检查哪些软件包在你成功启动后被更新了。
|
||||
|
||||
* 并记下软件包的名称和版本。你可以尝试逐一降级软件包,或者如果你认为某个特定的软件包产生了问题。使用 pacman 命令的 -U 开关来降级。
|
||||
|
||||
```
|
||||
pacman -U <package name>
|
||||
```
|
||||
|
||||
* 如果有的话,你可以在降级后运行以下命令来启动你的 Arch 系统。
|
||||
|
||||
```
|
||||
exec /sbin/init
|
||||
```
|
||||
|
||||
* 检查你的显示管理器的状态,是否有任何错误。有时,显示管理器会产生一个问题,无法与 X 服务器通信。例如,如果你正在使用 lightdm,那么你可以通过以下方式检查它的状态。
|
||||
|
||||
```
|
||||
systemctl status lightdm
|
||||
```
|
||||
|
||||
* 或者,可以通过下面的命令启动它,并检查什么是错误。
|
||||
|
||||
```
|
||||
lightdm --test-mode --debug
|
||||
```
|
||||
|
||||
、* 下面是一个 lightdm 失败的例子,它导致了一个不稳定的 Arch 系统。
|
||||
|
||||
![lightdm - test mode][4]
|
||||
|
||||
* 或者通过使用 startx 启动 X 服务器来检查。
|
||||
|
||||
```
|
||||
startx
|
||||
```
|
||||
|
||||
* 根据我的经验,如果你在上述命令中看到错误,尝试安装另一个显示管理器,如 sddm 并启用它。它可能会消除这个错误。
|
||||
|
||||
* 根据你的系统状态,尝试上述步骤,并进行故障排除。对于特定于显示管理器 lightdm 的错误,我们有一个[指南][5],你可能想查看一下。
|
||||
|
||||
* 如果你使用的是 sddm,那么请查看[这些故障排除步骤][6]是否可以。
|
||||
|
||||
### 结束语
|
||||
|
||||
每个安装都是不同的。上述步骤可能对你不起作用。但它值得一试,根据经验,它是有效的。如果它起作用,那么,对你来说是好事。无论哪种方式,请在下面的评论区中告诉我,它结果如何。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.debugpoint.com/2021/07/recover-arch-linux/
|
||||
|
||||
作者:[Arindam][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.debugpoint.com/author/admin1/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://www.debugpoint.com/tag/arch-linux
|
||||
[2]: https://www.debugpoint.com/2021/01/etcher-bootable-usb-linux/
|
||||
[3]: https://archlinux.org/download/
|
||||
[4]: https://www.debugpoint.com/wp-content/uploads/2021/03/lightdm-test-mode.jpg
|
||||
[5]: https://www.debugpoint.com/2021/03/failed-to-start-lightdm/
|
||||
[6]: https://wiki.archlinux.org/title/SDDM#Troubleshooting
|
@ -1,273 +0,0 @@
|
||||
[#]: subject: "How To Boot Into Rescue Mode Or Emergency Mode In Ubuntu 22.04 / 20.04 / 18.04"
|
||||
[#]: via: "https://ostechnix.com/how-to-boot-into-rescue-mode-or-emergency-mode-in-ubuntu-18-04/"
|
||||
[#]: author: "sk https://ostechnix.com/author/sk/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "robsean"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
如何在 Ubuntu 22.04 / 20.04 / 18.04 中启动到 <ruby>救援<rt>Rescue</rt></ruby> 模式 或 <ruby>紧急<rt>Emergency</rt></ruby> 模式
|
||||
======
|
||||
这篇教程将介绍如何在 Ubuntu 22.04、20.04 和 18.04 LTS 版本中启动到 <ruby>救援<rt>Rescue</rt></ruby> 模式 或 <ruby>紧急<rt>Emergency</rt></ruby> 模式。
|
||||
|
||||
你可能已经知道,在 Linux 发行版中 **<ruby>运行等级<rt>Runlevels</rt></ruby>** 已经被 **<ruby>系统目标<rt>Systemd targets</rt></ruby>** 所替代,例如, RHEL 7 、RHEL 8 、Ubuntu 16.04 LTS 及其更新的版本。更多关于 <ruby>运行等级<rt>Runlevels</rt></ruby> 和 <ruby>系统目标<rt>Systemd targets</rt></ruby> 的信息,参考 [这篇指南][1] 。
|
||||
|
||||
这篇指南是针对 Ubuntu 编写的,但是,下面所给的步骤应该也适用于大多数使用 **Systemd** 作为默认服务管理器的 Linux 发行版。
|
||||
|
||||
在进入主题前,让我们简单的理解:什么是 <ruby>救援<rt>rescue</rt></ruby> 模式 和 <ruby>紧急<rt>Emergency</rt></ruby> 模式,以及这两种模式的目的是什么。
|
||||
|
||||
### 什么是 <ruby>救援<rt>rescue</rt></ruby> 模式?
|
||||
|
||||
在 Linux 发行版中,<ruby>救援<rt>rescue</rt></ruby> 模式 等效于 <ruby>单用户<rt>single user</rt></ruby> 模式,它使用 **SysV** 作为默认的服务器管理器。在 <ruby>救援<rt>rescue</rt></ruby> 模式 中,将挂载所有的本地文件系统,将仅启动一些重要的服务。但是,不会启动一般的服务 (例如,网络服务)。
|
||||
|
||||
<ruby>救援<rt>rescue</rt></ruby> 模式 在不能正常启动系统的情况下是很有用的。此外,我们可以在 <ruby>救援<rt>rescue</rt></ruby> 模式 下执行一些重要的 <ruby>救援<rt>rescue</rt></ruby> 操作,例如,[重新设置 root 密码][2] 。
|
||||
|
||||
### 什么是 <ruby>紧急<rt>Emergency</rt></ruby> 模式?
|
||||
|
||||
与 <ruby>救援<rt>rescue</rt></ruby> 模式相比, 在 <ruby>紧急<rt>Emergency</rt></ruby> 模式中,不会启动任何的东西。不会启动服务,不会挂载挂载点,不会建立套接字,什么都不会启动。你将所拥有的只是一个 **原始的 shell** 。<ruby>紧急<rt>Emergency</rt></ruby> 模式适用于调试目的。
|
||||
|
||||
首先,我们将看到如何在 Ubuntu 22.04 和 20.04 LTS 发行版中启动到 <ruby>救援<rt>Rescue</rt></ruby> 模式 或 <ruby>紧急<rt>Emergency</rt></ruby> 模式。在 Ubuntu 22.04 和 20.04 LTS 中进入 <ruby>救援<rt>rescue</rt></ruby> 模式 的过程是完全相同的!
|
||||
|
||||
### 在 Ubuntu 22.04 / 20.04 LTS 中启动到 <ruby>救援<rt>rescue</rt></ruby> 模式
|
||||
|
||||
我们可以使用两种方法来启动到 <ruby>救援<rt>rescue</rt></ruby> 模式。
|
||||
|
||||
#### 方法 1
|
||||
|
||||
打开你的 Ubuntu 系统。在 BIOS 徽标出现后,按下 ESC 按键来显示 GRUB 菜单。
|
||||
|
||||
在 GRUB 菜单中,选择第一项,并按下 **"e"** 按键来编辑它。
|
||||
|
||||
![GRUB Menu In Ubuntu 22.04 / 20.04 LTS][3]
|
||||
|
||||
按下 **下箭头** 按键,并找到以单词 **"linux"** 开头的一行代码,并在其结尾处添加下面的一行代码。为到达其结尾处,只需要按下 **CTRL+e** 组合键,或使用你键盘上的 **END** 按键或 **左箭头/右箭头** 按键。
|
||||
|
||||
```
|
||||
systemd.unit=rescue.target
|
||||
```
|
||||
|
||||
![Edit Grub Boot Menu Entries To Enter Into Rescue Mode In Ubuntu 22.04 / 20.04 LTS][4]
|
||||
|
||||
在添加上面的代码行后,按下 **Ctrl+x** 组合键 或按下 **F10** 按键来启动到 <ruby>救援<rt>rescue</rt></ruby> 模式.
|
||||
|
||||
数秒后,你将作为 root 用户来登陆到 <ruby>救援<rt>rescue</rt></ruby> 模式 (<ruby>单用户<rt>single user</rt></ruby> 模式) 。将会提示你按下 <ruby>回车<rt>ENTER</rt></ruby> 按键来进入维护模式。
|
||||
|
||||
下图是 Ubuntu 22.04 / 20.04 LTS 系统的 <ruby>救援<rt>rescue</rt></ruby> 模式 的样子:
|
||||
|
||||
![Boot Into Rescue Mode In Ubuntu 22.04 / 20.04 LTS][5]
|
||||
|
||||
现在,在 <ruby>救援<rt>rescue</rt></ruby> 模式 中做你想做的任何事。在 <ruby>救援<rt>rescue</rt></ruby> 模式 中,在你执行任何操作前,你可能需要以 读/写 模式 的方式来挂载 root (**/**) 文件系统。
|
||||
|
||||
```
|
||||
mount -n -o remount,rw /
|
||||
```
|
||||
|
||||
![Mount Root File System In Read Write Mode In Ubuntu 22.04 / 20.04 LTS][6]
|
||||
|
||||
在完成后,按下 **"Ctrl+d"** 组合键来启动到正常模式。或者,你可以输入下面的任意一个命令来启动到正常模式。
|
||||
|
||||
```
|
||||
systemctl default
|
||||
```
|
||||
|
||||
或者,
|
||||
|
||||
```
|
||||
exit
|
||||
```
|
||||
|
||||
如果你想重新启动系统,而不是启动到正常的模式,输入:
|
||||
|
||||
```
|
||||
systemctl reboot
|
||||
```
|
||||
|
||||
#### 方法 2
|
||||
|
||||
在这种方法中,你不需要编辑 GRUB 启动菜单项目。
|
||||
|
||||
打开系统电源,并从 GRUB 启动菜单中选择 <ruby>Ubuntu 高级选项<rt>Advanced options for Ubuntu</rt></ruby>。
|
||||
|
||||
![Choose Advanced Options For Ubuntu From Grub Boot Menu][7]
|
||||
|
||||
接下来,你将看到一个带有内核版本的可用的 Ubuntu 版本的列表。在 Ubuntu 中的 GRUB 启动菜单中选择 <ruby>恢复<rt>Recovery</rt></ruby> 模式。
|
||||
|
||||
![Choose Recovery Mode In Grub Boot Menu In Ubuntu 22.04 / 20.04 LTS][8]
|
||||
|
||||
数秒后,你将看到 Ubuntu 的 <ruby>恢复<rt>Recovery</rt></ruby> 菜单。从 <ruby>恢复<rt>Recovery</rt></ruby> 菜单中,选择 **<ruby>进入 root 的 shell 提示符<rt>Drop to root shell prompt</rt></ruby>** 选项 ,并按下 <ruby>回车<rt>ENTER</rt></ruby> 按键。
|
||||
|
||||
![Enter Into Root Shell Prompt In Ubuntu 22.04 / 20.04 LTS][9]
|
||||
|
||||
现在,你将登陆到 <ruby>救援<rt>rescue</rt></ruby> 模式。
|
||||
|
||||
![Ubuntu Maintenance Mode][10]
|
||||
|
||||
通过输入下面的命令来 以 读/写 模式的方式 来挂载 root (**/**) 文件系统:
|
||||
|
||||
```
|
||||
mount -n -o remount,rw /
|
||||
```
|
||||
|
||||
![Mount Root File System In Read Write Mode In Ubuntu][11]
|
||||
|
||||
在 <ruby>救援<rt>rescue</rt></ruby> 模式 中做你想做的任何事。
|
||||
|
||||
在完成后,输入 **exit** 来返回到 <ruby>恢复<rt>Recovery</rt></ruby> 菜单。
|
||||
|
||||
```
|
||||
exit
|
||||
```
|
||||
|
||||
最后,选择 **<ruby>救援正常启动<rt>Resume normal boot</rt></ruby>** 选项,并按下 <ruby>回车<rt>ENTER</rt></ruby> 按键。
|
||||
|
||||
![Boot Into Normal Mode In Ubuntu][12]
|
||||
|
||||
再次按下 <ruby>回车<rt>ENTER</rt></ruby> 按键来退出 <ruby>恢复<rt>Recovery</rt></ruby> 模式,并继续启动到正常模式。
|
||||
|
||||
![Exit The Recovery Mode In Ubuntu][13]
|
||||
|
||||
如果你不想启动到正常模式,输入 **reboot** 并从维护模式中按下 <ruby>回车<rt>ENTER</rt></ruby> 按键来重新启动你的系统。
|
||||
|
||||
### 在 Ubuntu 22.04 / 20.04 LTS 中启动到 <ruby>紧急<rt>Emergency</rt></ruby> 模式
|
||||
|
||||
当 GRUB 菜单出现时,按下 **"e"** 按键来编辑它。
|
||||
|
||||
![GRUB Menu In Ubuntu 22.04 / 20.04 LTS][14]
|
||||
|
||||
找到以单词 **"linux"** 开头的一行代码,并在其结尾处添加下面的一行代码。
|
||||
|
||||
```
|
||||
systemd.unit=emergency.target
|
||||
```
|
||||
|
||||
![Edit Grub Boot Menu Entries To Enter Into Emergency Mode In Ubuntu 22.04 / 20.04 LTS][15]
|
||||
|
||||
在添加上面的代码行后,按下 **Ctrl+x** 组合键,或按下 **F10** 按键来启动到 <ruby>紧急<rt>Emergency</rt></ruby> 模式。
|
||||
|
||||
数秒后,你将作为 `root` 用户来登陆到 <ruby>紧急<rt>Emergency</rt></ruby> 模式。将会提示你按下 <ruby>回车<rt>ENTER</rt></ruby> 按键来进入维护模式。
|
||||
|
||||
下图是 Ubuntu 22.04 / 20.04 LTS 系统的 <ruby>紧急<rt>Emergency</rt></ruby> 模式 的样子:
|
||||
|
||||
![Boot Into Emergency Mode In Ubuntu 22.04 / 20.04 LTS][16]
|
||||
|
||||
现在,在 <ruby>紧急<rt>Emergency</rt></ruby> 模式 中做你想做的任何事。在 <ruby>紧急<rt>Emergency</rt></ruby> 模式 中,在你执行任何操作前,你可能需要以 读/写 模式 的方式来挂载 root (**/**) 文件系统。
|
||||
|
||||
```
|
||||
mount -n -o remount,rw /
|
||||
```
|
||||
|
||||
在完成后,按下 **"Ctrl+d"** 组合键来启动到正常模式。或者,你可以输入下面的任意一个命令来启动到正常模式。
|
||||
|
||||
```
|
||||
systemctl default
|
||||
```
|
||||
|
||||
或者,
|
||||
|
||||
```
|
||||
exit
|
||||
```
|
||||
|
||||
如果你想重新启动系统,而不是启动到正常的模式,输入:
|
||||
|
||||
```
|
||||
systemctl reboot
|
||||
```
|
||||
|
||||
### 在 Ubuntu 18.04 LTS 中启动到 <ruby>救援<rt>rescue</rt></ruby> 模式
|
||||
|
||||
启动你的 Ubuntu 系统。当 GRUB 菜单出现时,选择第一项并按下按键 **"e"** 来编辑。(为到达其结尾处,只需要按下 **CTRL+e** 组合键,或使用你键盘上的 **END** 按键或 **左箭头/右箭头** 按键):
|
||||
|
||||
![Grub Menu][17]
|
||||
|
||||
如果你没有看到 GRUB 菜单,只需要在 BIOS 徽标出现后,按下 ESC 按键来显示 GRUB 菜单。
|
||||
|
||||
找到以单词 **"linux"** 开头的一行代码,并在其结尾处添加下面的一行代码 (为到达其结尾处,只需要按下 **CTRL+e** 组合键,或使用你键盘上的 **END** 按键或 **左箭头/右箭头** 按键):
|
||||
|
||||
```
|
||||
systemd.unit=rescue.target
|
||||
```
|
||||
|
||||
![Edit Grub Menu][18]
|
||||
|
||||
在添加上面的代码行后,只需要按下 **Ctrl+x** 组合键,或按下 **F10** 按键来启动到 <ruby>救援<rt>rescue</rt></ruby> 模式。数秒后,你将作为 `root` 用户来登陆到 <ruby>救援<rt>rescue</rt></ruby> 模式 (<ruby>单用户<rt>single user</rt></ruby> 模式) 。
|
||||
|
||||
下图是 Ubuntu 18.04 LTS 服务器 系统的 <ruby>救援<rt>rescue</rt></ruby> 模式 的样子:
|
||||
|
||||
![Ubuntu Rescue Mode][19]
|
||||
|
||||
接下来,输入下面的命令来挂载 root (**/**) 文件系统为 读/写 模式。
|
||||
|
||||
```
|
||||
mount -n -o remount,rw /
|
||||
```
|
||||
|
||||
### 启动到 <ruby>紧急<rt>Emergency</rt></ruby> 模式
|
||||
|
||||
启动你的 Ubuntu 到 <ruby>紧急<rt>Emergency</rt></ruby> 模式 基本与上述方法相同。你所需要做的全部工作是,在编辑 GRUB 菜单时,将 **"systemd.unit=rescue.target"** 替换为 **"systemd.unit=emergency.target"** 。
|
||||
|
||||
![Edit Grub Menu][20]
|
||||
|
||||
在你添加 "systemd.unit=emergency.target" 后,按下 **Ctrl+x** 组合键,或按下 **F10** 按键来启动到 <ruby>紧急<rt>Emergency</rt></ruby> 模式。
|
||||
|
||||
![Ubuntu Emergency Mode][21]
|
||||
|
||||
最后,你可以使用下面的命令来以 读/写 模式的方式 来挂载 root (**/**) 文件系统:
|
||||
|
||||
```
|
||||
mount -n -o remount,rw /
|
||||
```
|
||||
|
||||
### 在 <ruby>救援<rt>rescue</rt></ruby> 模式 和 <ruby>紧急<rt>Emergency</rt></ruby> 模式 之间切换
|
||||
|
||||
如果你正在 <ruby>救援<rt>rescue</rt></ruby> 模式 中,你不必像我上述提到的那样来编辑 GRUB 的菜单启动项。相反,你只想要输入下面的命令来立刻切换到 <ruby>紧急<rt>Emergency</rt></ruby> 模式:
|
||||
|
||||
```
|
||||
systemctl emergency
|
||||
```
|
||||
|
||||
同样,为从 <ruby>紧急<rt>Emergency</rt></ruby> 模式 切换到 <ruby>救援<rt>rescue</rt></ruby> 模式,输入:
|
||||
|
||||
```
|
||||
systemctl rescue
|
||||
```
|
||||
|
||||
### 总结
|
||||
|
||||
现在,你知道了什么是 <ruby>救援<rt>Rescue</rt></ruby> 模式 和 <ruby>紧急<rt>Emergency</rt></ruby> 模式,以及如何在 Ubuntu 22.04 、20.04 和 18.04 LTS 系统中启动到这些模式。 正如我已经提到的,在这里提供的这些步骤应该也适用于大多数当前使用 **Systemd** 作为默认服务管理器的 Linux 发行版。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://ostechnix.com/how-to-boot-into-rescue-mode-or-emergency-mode-in-ubuntu-18-04/
|
||||
|
||||
作者:[sk][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://ostechnix.com/author/sk/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://ostechnix.com/check-runlevel-linux/
|
||||
[2]: https://ostechnix.com/how-to-reset-or-recover-root-user-password-in-linux/
|
||||
[3]: https://ostechnix.com/wp-content/uploads/2022/05/GRUB-Menu-In-Ubuntu-22.04-LTS.png
|
||||
[4]: https://ostechnix.com/wp-content/uploads/2022/05/Edit-Grub-Boot-Menu-Entries-To-Enter-Into-Rescue-Mode-In-Ubuntu-22.04-LTS.png
|
||||
[5]: https://ostechnix.com/wp-content/uploads/2022/05/Boot-Into-Rescue-Mode-In-Ubuntu-22.04.png
|
||||
[6]: https://ostechnix.com/wp-content/uploads/2022/05/Mount-Root-File-System-In-Read-Write-Mode-In-Ubuntu.png
|
||||
[7]: https://ostechnix.com/wp-content/uploads/2022/05/Choose-Advanced-Options-For-Ubuntu-From-Grub-Boot-Menu.png
|
||||
[8]: https://ostechnix.com/wp-content/uploads/2022/05/Choose-Recovery-Mode-In-Grub-Boot-Menu-In-Ubuntu.png
|
||||
[9]: https://ostechnix.com/wp-content/uploads/2022/05/Enter-Into-Root-Shell-Prompt-In-Ubuntu.png
|
||||
[10]: https://ostechnix.com/wp-content/uploads/2022/05/Ubuntu-Maintenance-Mode.png
|
||||
[11]: https://ostechnix.com/wp-content/uploads/2022/05/Mount-Root-File-System-In-Read-Write-Mode-In-Ubuntu-1.png
|
||||
[12]: https://ostechnix.com/wp-content/uploads/2022/05/Boot-Into-Normal-Mode-In-Ubuntu.png
|
||||
[13]: https://ostechnix.com/wp-content/uploads/2022/05/Exit-The-Recovery-Mode-In-Ubuntu.png
|
||||
[14]: https://ostechnix.com/wp-content/uploads/2022/05/GRUB-Menu-In-Ubuntu-22.04-LTS.png
|
||||
[15]: https://ostechnix.com/wp-content/uploads/2022/05/Edit-Grub-Boot-Menu-Entries-To-Enter-Into-Emergency-Mode-In-Ubuntu.png
|
||||
[16]: https://ostechnix.com/wp-content/uploads/2018/12/Boot-Into-Emergency-Mode-In-Ubuntu-20.04-LTS.png
|
||||
[17]: https://ostechnix.com/wp-content/uploads/2018/12/Grub-menu.png
|
||||
[18]: https://ostechnix.com/wp-content/uploads/2018/12/Edit-grub-menu.png
|
||||
[19]: https://ostechnix.com/wp-content/uploads/2018/12/Ubuntu-rescue-mode.png
|
||||
[20]: https://ostechnix.com/wp-content/uploads/2018/12/emergency-mode.png
|
||||
[21]: https://ostechnix.com/wp-content/uploads/2018/12/emergency-mode-1.png
|
@ -0,0 +1,157 @@
|
||||
[#]: subject: "How Garbage Collection works inside a Java Virtual Machine"
|
||||
[#]: via: "https://opensource.com/article/22/6/garbage-collection-java-virtual-machine"
|
||||
[#]: author: "Jayashree Huttanagoudar https://opensource.com/users/jayashree-huttanagoudar"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "lkxed"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
JVM 垃圾回收的工作原理
|
||||
======
|
||||
对于程序员来说,掌握 Java 的内存管理机制并不是必须的,但它能够帮助你更好地理解 JVM 是如何处理程序中的变量和类实例的。
|
||||
|
||||
![咖啡豆][1]
|
||||
|
||||
图源:Pixabay. CC0.
|
||||
|
||||
Java 之所以能够如此流行,自动 <ruby>垃圾回收<rt>Garbage Collection</rt></ruby>(GC)功不可没,它也是 Java 最重要的几个特性之一。在这篇文章中,我将说明为什么垃圾回收如此重要。本文的主要内容为:自动的分代垃圾回收、JVM 划分内存的依据,以及 JVM 垃圾回收的工作原理。
|
||||
|
||||
### Java 内存分配
|
||||
|
||||
Java 程序的内存空间被划分为以下四个区域:
|
||||
|
||||
1. 堆区(Heap):对象实例就是在这个区域分配的。不过,当我们声明一个对象时,堆中不会有任何内存分配发生,只是在栈中创建了一个对象的引用而已。
|
||||
2. 栈区(Stack):方法、局部变量和类的实例变量就是在这个区域分配的。
|
||||
3. 代码区(Code):这个区域存放了程序的字节码。
|
||||
4. 静态区(Static):这个区域存放了程序的静态数据和静态方法。
|
||||
|
||||
### 什么是自动垃圾回收?
|
||||
|
||||
自动垃圾回收是这样一个过程:首先,堆中的所有对象会被分类为“被引用的”和“未被引用的”;接着,“未被引用的对象”就会被做上标记,以待之后删除。其中,“被引用的对象”是指程序中的某一部分仍在使用的对象,“未被引用的对象”是指目前没有正在被使用的对象。
|
||||
|
||||
许多编程语言,例如 C 和 C++,都需要程序员手动管理内存的分配和释放。在 Java 中,这一过程是通过垃圾回收机制来自动完成的(尽管你也可以在代码中调用 `system.gc();` 来手动触发垃圾回收)。
|
||||
|
||||
垃圾回收的基本步骤如下:
|
||||
|
||||
#### 1. 标记已使用和未使用的对象
|
||||
|
||||
在这一步骤中,已使用和未使用的对象会被分别做上标记。这是一个及其耗时的过程,因为需要扫描内存中的所有对象,才能够确定它们是否正在被使用。
|
||||
|
||||
![标记已使用和未使用的对象][2]
|
||||
|
||||
#### 2. 扫描/删除对象
|
||||
|
||||
有两种不同的扫描和删除算法:
|
||||
|
||||
**简单删除(标记清除)**:它的过程很简单,我们只需要删除未被引用的对象即可。但是,后续给新对象分配内存就会变得很困难了,因为可用空间被分割成了一块块碎片。
|
||||
|
||||
![标记清除的过程][3]
|
||||
|
||||
**删除压缩(标记整理)**:除了会删除未被引用的对象,我们还会压缩被引用的对象(未被删除的对象)。这样以来,新对象的内存分配就相对容易了,并且内存分配的效率也有了提升。
|
||||
|
||||
![标记整理的过程][4]
|
||||
|
||||
### 什么是分代垃圾回收,为什么需要它?
|
||||
|
||||
正如我们在“扫描删除”模型中所看到的,一旦对象不断增长,我们就很难扫描所有未使用的对象以回收内存。不过,有一项实验性研究指出,在程序执行期间创建的大多数对象,它们的存活时间都很短。
|
||||
|
||||
既然大多数对象的存活时间都很短,那么我们就可以利用这个事实,从而提升垃圾回收的效率。该怎么做呢?首先,JVM 将内存划分为不同的“代”。接着,它将所有的对象都分类到这些内存“代”中,然后对这些“代”分别执行垃圾回收。这就是“分代垃圾回收”。
|
||||
|
||||
### 堆内存的“代”和分代垃圾回收过程
|
||||
|
||||
为了提升垃圾回收中的“标记清除”的效率,JVM 将对内存划分成以下三个“代”:
|
||||
|
||||
* 年轻代
|
||||
* 老年代
|
||||
* 永久代
|
||||
|
||||
![Hotspot 堆内存结构][5]
|
||||
|
||||
下面我将介绍每个“代”及其主要特征。
|
||||
|
||||
#### 年轻代
|
||||
|
||||
所有创建不久的对象都存放在这里。年轻代被进一步分为以下两个区域:
|
||||
|
||||
1. 伊甸区(Eden):所有新创建的对象都在此处分配内存。
|
||||
2. 幸存者区(Survivor,分为 S0 和 S1):经历过一次垃圾回收后,仍然存活的对象会被移动到两个幸存者区中的一个。
|
||||
|
||||
![对象分配][6]
|
||||
|
||||
在年轻代发生的分代垃圾回收被称为 “Minor GC”。Minor GC 过程中的每个阶段都是“<ruby>停止世界<rt>Stop The World</rt></ruby>”(STW)的,这会导致其他应用程序暂停运行,直到垃圾回收结束。这也是 Minor GC 更快的原因。
|
||||
|
||||
一句话总结:伊甸区存放了所有新创建的对象,当它的可用空间被耗尽,第一次垃圾回收就会被触发。
|
||||
|
||||
![填充伊甸区][7]
|
||||
|
||||
Minor GC:在该垃圾回收过程中,所有存活和死亡的对象都会被做上标记。其中,存活对象会被移动到 S0 幸存者区。当所有存活对象都被移动到了 S0,未被引用的对象就会被删除。
|
||||
|
||||
![拷贝被引用的对象][8]
|
||||
|
||||
S0 中的对象年龄为 1,因为它们挺过了一次 Minor GC。此时,伊甸区和 S1 都是空的。
|
||||
|
||||
每当完成清理后,伊甸区就会再次接受新的存活对象。随着时间的推移,伊甸区和 S0 中的某些对象被宣判死亡(不再被引用),并且伊甸区的可用空间也再次耗尽(填满了),那么 Minor GC 又将再次被触发。
|
||||
|
||||
![对象年龄增长][9]
|
||||
|
||||
这一次,伊甸区和 S0 中的死亡和存活的对象会被做上标记。其中,伊甸区的存活对象会被移动到 S1,并且年龄增加至 1。S0 中的存活对象也会被移动到 S1,并且年龄增加至 2(因为它们挺过了两次 Minor GC)。此时,伊甸区和 S0 又是空的了。每次 Minor GC 之后,伊甸区和两个幸存者区中的一个都会是空的。
|
||||
|
||||
新对象总是在伊甸区被创建,周而复始。当下一次垃圾回收发生时,伊甸区和 S1 都会被清理,它们中的存活对象会被移动到 S0 区。每次 Minor GC 之后,这两个幸存者区(S0 和 S1)就会交换一次。
|
||||
|
||||
![额外年龄增长][10]
|
||||
|
||||
这个过程会一直进行下去,直到某个存活对象的年龄达到了某个阈值,然后它就会被移动到一个叫做“老年代”的地方,这是通过一个叫做“晋升”的过程来完成的。
|
||||
|
||||
使用 `-Xmn` 选项可以设置年轻代的大小。
|
||||
|
||||
### 老年代
|
||||
|
||||
这个区域存放着那些挺过了许多次 Minor GC,并且达到了某个年龄阈值的对象。
|
||||
|
||||
![晋升][11]
|
||||
|
||||
在上面这个示例图表中,晋升的年龄阈值为 8。在老年代发生的垃圾回收被称为 “Major GC”。
|
||||
|
||||
使用 `-Xms` 和 `-Xmx` 选项可以分别设置堆内存大小的初始值和最大值。(LCTT 译注:结合上面的 `-Xmn` 选项,就可以间接设置老年代的大小了。)
|
||||
|
||||
### 永久代
|
||||
|
||||
永久代存放着一些元数据,它们与应用程序、Java 标准环境以及 JVM 自用的库类及其方法相关。JVM 会在运行时,用到了什么类和方法,就会填充相应的数据。当 JVM 发现有未使用的类,就会卸载或是回收它们,从而为正在使用的类腾出空间。
|
||||
|
||||
使用 `-XX:PermGen` 和 `-XX:MaxPerGen` 选项可以分别设置永久代大小的初始值和最大值。
|
||||
|
||||
#### 元空间
|
||||
|
||||
Java 8 引入了元空间,并用它替换了永久代。这么做的好处是自动调整大小,避免了 <ruby>内存不足<rt>OutOfMemory</rt></ruby>(OOM)错误。
|
||||
|
||||
### 总结
|
||||
|
||||
本文讨论了各种不同的 JVM 内存“代”,以及它们是如何在分代垃圾回收算法中起作用的。对于程序员来说,掌握 Java 的内存管理机制并不是必须的,但它能够帮助你更好地理解 JVM 处理程序中的变量和类实例的方式。这种理解使你能够规划和排除代码故障,并理解特定平台固有的潜在限制。
|
||||
|
||||
正文配图来自:Jayashree Huttanagoudar,CC BY-SA 4.0
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/6/garbage-collection-java-virtual-machine
|
||||
|
||||
作者:[Jayashree Huttanagoudar][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[lkxed](https://github.com/lkxed)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/jayashree-huttanagoudar
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://opensource.com/sites/default/files/lead-images/java-coffee-beans.jpg
|
||||
[2]: https://opensource.com/sites/default/files/2022-06/1Marking.png
|
||||
[3]: https://opensource.com/sites/default/files/2022-06/2NormalDeletion.png
|
||||
[4]: https://opensource.com/sites/default/files/2022-06/3DeletionwithCompacting.png
|
||||
[5]: https://opensource.com/sites/default/files/2022-06/4Hotspot.png
|
||||
[6]: https://opensource.com/sites/default/files/2022-06/5ObjAllocation.png
|
||||
[7]: https://opensource.com/sites/default/files/2022-06/6FillingEden.png
|
||||
[8]: https://opensource.com/sites/default/files/2022-06/7CopyingRefdObjs.png
|
||||
[9]: https://opensource.com/sites/default/files/2022-06/8ObjAging.png
|
||||
[10]: https://opensource.com/sites/default/files/2022-06/9AddlAging.png
|
||||
[11]: https://opensource.com/sites/default/files/2022-06/10Promotion.png
|
@ -0,0 +1,85 @@
|
||||
[#]: subject: "How to Boot Ubuntu 22.04 into Rescue / Emergency Mode"
|
||||
[#]: via: "https://www.linuxtechi.com/boot-ubuntu-22-04-rescue-emergency-mode/"
|
||||
[#]: author: "Pradeep Kumar https://www.linuxtechi.com/author/pradeep/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
如何启动 Ubuntu 22.04 进入救援/紧急模式
|
||||
======
|
||||
极客们好,将 Ubuntu 22.04(Jammy Jellyfish)启动到救援和紧急模式有助于重置忘记的用户密码,修复文件系统错误以及在启动过程中禁用或启用 systemd 服务。
|
||||
|
||||
在这篇文章中,我们将学习如何启动 Ubuntu 22.04 LTS 系统进入救援和应急模式。救援模式类似于单用户模式,所有的故障排除步骤都在这里进行。救援模式加载最小的环境并挂载根文件系统。
|
||||
|
||||
而在紧急模式下,我们得到的是单用户 shell,而不启动任何系统服务。因此,当我们无法启动系统进入救援模式时,就需要紧急模式。
|
||||
|
||||
### 启动 Ubuntu 22.04 进入救援或单用户模式
|
||||
|
||||
前往你想启动到救援或单用户模式的目标系统。在启动时按下 “SHIFT+ESC” 键,进入 grub bootloader 页面。
|
||||
|
||||
![Default-Grub-Screen-Ubuntu-22-04][1]
|
||||
|
||||
选择第一个选项 Ubuntu,并按 “e” 键进入编辑模式。
|
||||
|
||||
在以 linux 开头的一行末尾,删除字符串 “$vt_handoff” 并添加字符串 “systemd.unit=rescue.target”。
|
||||
|
||||
![rescue-target-ubuntu-22-04][2]
|
||||
|
||||
做完修改后,按 Ctrl+x 或 F10 在救援模式下启动。
|
||||
|
||||
![Troubleshooting-Commands-in-Rescue-Mode][3]
|
||||
|
||||
进入救援模式后,运行所有的故障排除命令,并运行 “systemctl reboot” 命令来重启系统。
|
||||
|
||||
### 另一种启动系统进入救援模式的方法
|
||||
|
||||
重新启动系统并按下 “ESC+Shift” 键,进入 grub 启动界面。
|
||||
|
||||
选择第二个选项 “Advanced Options for Ubuntu”->选择恢复模式选项并点击回车->选择 Root(进入 root shell 提示)。
|
||||
|
||||
下面是一个例子
|
||||
|
||||
![Boot-Ubuntu-22-04-Rescue-Mode][4]
|
||||
|
||||
当你有了 root shell,运行命令来恢复和修复系统问题,最后使用 “systemctl reboot” 来重启系统。
|
||||
|
||||
### 引导 Ubuntu 22.04 进入紧急模式
|
||||
|
||||
要启动系统进入紧急模式,首先进入 grub 页面。
|
||||
|
||||
![Default-Grub-Screen-Ubuntu-22-04][5]
|
||||
|
||||
选择第一个选项 “Ubuntu” 并按 “e” 键进行编辑。寻找以 linux 开头的一行,移到该行的末尾,删除字符串 $vt_handoff 并添加字符串 “systemd.unit=emergency.target”。
|
||||
|
||||
![Emergency-Mode-Ubuntu-22-04][6]
|
||||
|
||||
按 Ctrl+x 或 F10 将系统启动到紧急模式。
|
||||
|
||||
![Command-in-Emergency-Mode-Ubuntu-22-04][7]
|
||||
|
||||
同样,在救援模式下,你可以在这个模式下执行所有的故障排除,完成后,就用 “systemctl reboot” 命令重启系统。
|
||||
|
||||
这篇文章的内容就这些。我发现它内容丰富,不要犹豫,在你的技术朋友中分享这个。请在下面的评论区发表你的疑问和反馈。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.linuxtechi.com/boot-ubuntu-22-04-rescue-emergency-mode/
|
||||
|
||||
作者:[Pradeep Kumar][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.linuxtechi.com/author/pradeep/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://www.linuxtechi.com/wp-content/uploads/2022/06/Default-Grub-Screen-Ubuntu-22-04.png
|
||||
[2]: https://www.linuxtechi.com/wp-content/uploads/2022/06/rescue-target-ubuntu-22-04.png
|
||||
[3]: https://www.linuxtechi.com/wp-content/uploads/2022/06/Troubleshooting-Commands-in-Rescue-Mode.png
|
||||
[4]: https://www.linuxtechi.com/wp-content/uploads/2022/06/Boot-Ubuntu-22-04-Rescue-Mode.gif
|
||||
[5]: https://www.linuxtechi.com/wp-content/uploads/2022/06/Default-Grub-Screen-Ubuntu-22-04.png
|
||||
[6]: https://www.linuxtechi.com/wp-content/uploads/2022/06/Emergency-Mode-Ubuntu-22-04.png
|
||||
[7]: https://www.linuxtechi.com/wp-content/uploads/2022/06/Command-in-Emergency-Mode-Ubuntu-22-04.png
|
@ -0,0 +1,90 @@
|
||||
[#]: subject: "Edit PDFs on Linux with these open source tools"
|
||||
[#]: via: "https://opensource.com/article/22/6/open-source-pdf-editors-linux"
|
||||
[#]: author: "Michael Korotaev https://opensource.com/users/michaelk"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
用这些开源工具在 Linux 上编辑 PDF 文件
|
||||
======
|
||||
Adobe Acrobat 的开源替代品具有创建、编辑和注释 PDF 的所有必要功能。
|
||||
|
||||
![a checklist for a team][1]
|
||||
|
||||
图片由:Opensource.com
|
||||
|
||||
开源的 PDF 阅读和编辑工具通常比 “PDF 编辑器”搜索结果第一页中的应用更安全和可靠。在那里,你很可能看到带有隐藏限制和关税的专有应用,缺乏关于数据保护政策和托管的足够信息。你可以有更好的。
|
||||
|
||||
这里有五个应用,可以安装在你的 Linux 系统上(和其他系统)或托管在服务器上。每一个都是免费和开源的,具有创建、编辑和注释 PDF 文件的所有必要功能。
|
||||
|
||||
### LibreOffice
|
||||
|
||||
使用 [LibreOffice][2] 套件,你对应用的选择取决于最初的任务。虽然文字处理器 LibreOffice Writer,可以让你创建 PDF 文件,并从 ODF 和其他文本格式导出,但 Draw 更适合于处理现有的 PDF 文件。
|
||||
|
||||
Draw 是用来创建和编辑图形文件的,如小册子、杂志和海报。因此,该工具集主要集中在视觉对象和布局上。然而,对于 PDF 编辑,当文件具有编辑属性时,LibreOffice Draw 提供了用于修改和添加 PDF 内容的工具。如果没有的话,你仍然可以在现有的内容层上添加新的文本字段,并对文件进行注释或完成。
|
||||
|
||||
Draw 和 Writer 都被捆绑在 LibreOffice 桌面套件中,可在 Linux 系统、macOS 和 Windows 上安装。
|
||||
|
||||
### ONLYOFFICE Docs
|
||||
|
||||
ONLYOFFICE 一直在改进 PDF 的处理,并在 [ONLYOFFICE Docs][3] 的 7.1 版本中引入了一个全新的 PDF 和电子书的阅读器。
|
||||
|
||||
该文档编辑器允许从头开始创建 PDF 文件,使用 DOCX 作为文件的基础,然后可以转换为 PDF 或 PDF/A。通过内置的表单创建功能,ONLYOFFICE Docs 还可以建立可填充的文档模板,并将其导出为可编辑的 PDF,并为不同类型的内容设置可填充的字段:文本、图像、日期等。
|
||||
|
||||
除了可以识别 PDF 内的文本进行复制和提取外,ONLYOFFICE Docs 还可以将 PDF 转换为 DOCX,这样你就可以继续使用完全可编辑的文本格式的文件。ONLYOFFICE 还可以让你用密码保护文件,添加水印,并使用桌面版中的数字签名。
|
||||
|
||||
ONLYOFFICE Docs 可以作为一个网络套件(内部或云端)集成到文档管理系统(DMS)或作为一个独立的桌面应用程序使用。你可以将后者作为 DEB 或 RPM 文件、AppImage、Flatpack 和其他几种格式在 Linux 中安装。
|
||||
|
||||
### PDF Arranger
|
||||
|
||||
[PDF Arranger][4] 是 PikePDF 库的一个前端应用。它不像 LibreOffice 和 ONLYOFFICE 那样对 PDF 的内容进行编辑,但它对于重新排序页面、将 PDF 分割成更小的文件、将几个 PDF 合并成一个、旋转或裁剪页面等都很好。它的界面是直观的,易于使用。
|
||||
|
||||
PDF Arranger 可用于 Linux 和 Windows。
|
||||
|
||||
### Okular
|
||||
|
||||
[Okular][5] 是一个由 KDE 社区开发的免费开源文档查看器。该应用的功能非常成熟,可以查看 PDF、电子书、图片和漫画。
|
||||
|
||||
Okular 完全或部分支持大多数流行的 PDF 功能和使用场景,如添加注释和内联笔记或插入文本框、形状和印章。你还可以为文档添加数字加密签名,这样你的读者就可以确定文档的来源。
|
||||
|
||||
除了在 PDF 中添加文本和图像外,还可以从文档中检索到它们,以复制和粘贴到其他地方。Okular 中的区域选择工具可以识别所选区域内的组件,所以你可以从 PDF 中独立提取它们。
|
||||
|
||||
你可以使用你的发行版包管理器或以 Flatpak 的形式安装 Okular。
|
||||
|
||||
### Xournal++
|
||||
|
||||
[Xournal++][6] 是一款带有 PDF 文件注释工具的手写日记软件。
|
||||
|
||||
它是一款具有强化手写功能的记事软件,对于处理基于文本的内容和专业布局来说,它可能不是最佳选择。然而,它渲染图形的能力以及对书写和绘图的手写笔输入的支持使它作为一个小众生产力工具脱颖而出。
|
||||
|
||||
图层管理工具、可定制的笔尖设置以及对手写笔映射的支持,使 PDF 注释和草图绘制变得更加舒适。Xournal++ 还有一个文本工具,用于添加文本框,并能插入图像。
|
||||
|
||||
Xournal++ 可在 Linux 系统(Ubuntu、Debian、Arch、SUSE)、MacOS 和 Windows(10及以上)中安装。
|
||||
|
||||
### 总结
|
||||
|
||||
如果你正在寻找一个免费和安全的专有 PDF 浏览和编辑软件的替代品,不难找到一个开源的选择,无论是桌面还是在线使用。只要记住,目前可用的解决方案在不同的使用情况下有各自的优势,没有一个工具在所有可能的任务中都同样出色。
|
||||
|
||||
这五个方案因其功能或对小众 PDF 任务的有用性而脱颖而出。对于企业使用和协作,我建议 ONLYOFFICE 或 LibreOffice Draw。PDF Arranger 是一个简单的、轻量级的工具,当你不需要改变文本时,可以用它来处理页面。Okular 为多种文件类型提供了很好的查看功能,如果你想在 PDF 中画草图和做笔记,Xournal++ 是最佳选择。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/6/open-source-pdf-editors-linux
|
||||
|
||||
作者:[Michael Korotaev][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/michaelk
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://opensource.com/sites/default/files/lead-images/checklist_hands_team_collaboration.png
|
||||
[2]: https://opensource.com/article/21/9/libreoffice-tips
|
||||
[3]: https://opensource.com/article/20/12/onlyoffice-docs
|
||||
[4]: https://flathub.org/apps/details/com.github.jeromerobert.pdfarranger
|
||||
[5]: https://opensource.com/article/22/4/linux-kde-eco-certification-okular
|
||||
[6]: http://xournal.sourceforge.net/
|
@ -0,0 +1,113 @@
|
||||
[#]: subject: "Manage Flatpak Permission Using Flatseal"
|
||||
[#]: via: "https://www.debugpoint.com/2022/06/manage-flatpak-permission-flatseal/"
|
||||
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
使用 Flatseal 管理 Flatpak 的权限
|
||||
======
|
||||
了解如何使用 Flatseal 应用管理 Flatpak 权限,它为你提供了一个友好的 GUI 和额外的功能。
|
||||
|
||||
从新用户的角度来看,在 Linux 中安装应用可能是一个挑战。主要原因是有这么多的 [Linux 发行版][1]。而你需要为各种 Linux 发行版提供不同的安装方法或说明。对于一些用户来说,这可能会让他们不知所措。此外,对于开发者来说,为不同的发行版创建独立的软件包和构建也很困难。
|
||||
|
||||
### Flatpak 解决了这个问题。如何解决?
|
||||
|
||||
它使用了容器技术,使同一个应用的可执行文件在所有的 Linux 平台上都能类似地运行。例如,一个单一的可执行文件可以在 Ubuntu、Fedora、OpenSUSE、Arch Linux 和许多其他平台上运行。
|
||||
|
||||
此外,开发人员还可以减少为不同平台打包同一应用的努力。他们可以专注于应用的功能,而不是发行或部署。
|
||||
|
||||
此外,Flatpak 应用还能即时更新,当有了最新版本,你就能得到它。
|
||||
|
||||
所有这些好处也开启了一个重要的问题。Flatpak 应用需要的权限是什么?你如何轻松地管理它们?例如,一个应用可能只需要网络访问,而不需要磁盘空间。或者另一个可能有截图的权限,但可能根本就不需要。
|
||||
|
||||
所以,审查一个 Flatpak 应用的权限是非常必要的。这与你的安卓或 iOS 应用的权限类似。
|
||||
|
||||
最后,即使你是一个新用户,管理和审查权限也不是那么困难,这要感谢图形化的应用 - Flatseal。
|
||||
|
||||
### 什么是 Flatseal?
|
||||
|
||||
Flatseal 是一个 Flatpak 应用,它为你提供了一个友好的用户界面来查看和改变你系统中所有 Flatpak 应用的权限。
|
||||
|
||||
它是一个优秀的小程序,每个应用的每个权限部分都有一个易于使用的切换按钮。下面是它的外观(图 1)。
|
||||
|
||||
![Figure 1 – Flatseal App][2]
|
||||
|
||||
### 你如何使用 Flatseal 来管理 Flatpak 的权限?
|
||||
|
||||
当打开 Flatseal 应用时,它应该在左边的导航栏列出所有的 Flatpak 应用。而当你选择了一个应用,它就会在右边的主窗口中显示可用的权限设置。
|
||||
|
||||
现在,对于每个 Flatpak 权限控制,当前值显示在切换开关中。如果该权限正在使用中,它应该被设置。否则,它应该是灰色的。
|
||||
|
||||
首先,要设置权限,你必须进入你的系统的应用。然后,你可以从权限列表中启用或禁用任何各自的控制。
|
||||
|
||||
其次,如果你想设置一个适用于你系统中所有 Flatpak 的全局控制,你可以在左上方选择“所有应用”并应用全局设置(图 2)。
|
||||
|
||||
![Figure 2: Manage Flatpak Permission using Flatseal][3]
|
||||
|
||||
这真是超级简单。不是吗?
|
||||
|
||||
### 使用 Flatseal 管理 Flatpak 权限的例子
|
||||
|
||||
让我们举个例子。
|
||||
|
||||
在我的系统中,我安装了上述 Flatpak(图 2)。让我们挑选 Telegram 桌面应用。目前,Telegram 桌面没有访问任何主目录或用户文件的权限(图 3)。
|
||||
|
||||
![Figure 3: Telegram Desktop Flatpak App does not have permission to the home folders][4]
|
||||
|
||||
现在,如果我想允许所有的用户文件和任何特定的文件夹(例如:/home/Downloads),你可以通过打开启用开关来给予它。请看下面的图 4。
|
||||
|
||||
![Figure 4: Permission changed of Telegram Desktop to give access to folders][5]
|
||||
|
||||
同样地,你可以启用或禁用你想要的权限。在内部,Flatseal 执行内部的 Flatpak 命令来实现这一点。
|
||||
|
||||
例如,上述情况可能转化为以下命令。
|
||||
|
||||
```
|
||||
flatpak override org.telegram.desktop --filesystem=/home/Downloads
|
||||
```
|
||||
|
||||
而要删除:
|
||||
|
||||
```
|
||||
flatpak override org.telegram.desktop --nofilesystem=/home/Downloads
|
||||
```
|
||||
|
||||
Flatseal 还有一个很酷的功能,它在用户特定的权限变化旁边显示一个小的警报图标(见图 4)。
|
||||
|
||||
### 我可以在所有的 Linux 发行版中安装 Flatseal 吗?
|
||||
|
||||
是的,你可以把 [Flatseal][6] 作为 Flatpak 安装在所有 Linux 发行版中。你可以使用[本指南][7]设置你的系统,并运行以下命令进行安装。或者,[点击这里][8]直接启动特定系统的安装程序。
|
||||
|
||||
```
|
||||
flatpak install flathub com.github.tchx84.Flatseal
|
||||
```
|
||||
|
||||
### 结束语
|
||||
|
||||
我希望上面的 Flatpak 权限管理指南足够简单,让你了解并开始使用 Flatpak。它超级容易控制,使用起来也容易得多。另外,你可能想访问我们更多的 [Flatpak 指南][9]。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.debugpoint.com/2022/06/manage-flatpak-permission-flatseal/
|
||||
|
||||
作者:[Arindam][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.debugpoint.com/author/admin1/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://www.debugpoint.com/category/distributions
|
||||
[2]: https://www.debugpoint.com/wp-content/uploads/2022/06/Flatseal-App.jpg
|
||||
[3]: https://www.debugpoint.com/wp-content/uploads/2022/06/Manage-Flatpak-Permission-using-Flatseal.jpg
|
||||
[4]: https://www.debugpoint.com/wp-content/uploads/2022/06/Telegram-Desktop-Flatpak-App-does-not-have-permission-to-the-home-folders.jpg
|
||||
[5]: https://www.debugpoint.com/wp-content/uploads/2022/06/Permission-changed-of-Telegram-Desktop-to-give-access-to-folders.jpg
|
||||
[6]: https://flathub.org/apps/details/com.github.tchx84.Flatseal
|
||||
[7]: https://flatpak.org/setup/
|
||||
[8]: https://dl.flathub.org/repo/appstream/com.github.tchx84.Flatseal.flatpakref
|
||||
[9]: https://www.debugpoint.com/tag/flatpak/
|
Loading…
Reference in New Issue
Block a user