mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-02-22 00:40:10 +08:00
commit
bcccc61201
@ -3,17 +3,18 @@
|
|||||||
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
|
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
|
||||||
[#]: collector: "lujun9972"
|
[#]: collector: "lujun9972"
|
||||||
[#]: translator: "unigeorge"
|
[#]: translator: "unigeorge"
|
||||||
[#]: reviewer: " "
|
[#]: reviewer: "wxy"
|
||||||
[#]: publisher: " "
|
[#]: publisher: "wxy"
|
||||||
[#]: url: " "
|
[#]: url: "https://linux.cn/article-13924-1.html"
|
||||||
|
|
||||||
在 OpenTTD 中玩模型火车
|
在 OpenTTD 中玩模型火车
|
||||||
======
|
======
|
||||||
|
|
||||||
想玩实体模型火车,却没有足够大的空间?试试 OenTTD 中的虚拟火车吧。
|
> 想玩实体模型火车,却没有足够大的空间?试试 OpenTTD 中的虚拟火车吧。
|
||||||
![Old train][1]
|
|
||||||
|
|
||||||
我父亲一直很喜欢火车模型,我记得我小时候,曾看着他在圣诞树周围建了一整条轨道。当[乐高][2]火车套装发布时,因其便利性和固有可扩展性,我们转而投向了乐高火车的怀抱。多年来,我们热衷于建造和改装乐高火车及单轨轨道。我经常想象,未来我会有一个车库或地下室,专门用于微型景观和电动汽笛火车。强调一下,我沉迷于另一个爱好的可能性非常低,所以当发现 _虚拟_ 模型铁路可以为我提供相同的满足感时,我很开心。我的虚拟爱好引擎是 [OpenTTD][3],这是一款基于名为 **Transport Tycoon Deluxe** 的 90 年代老游戏的开源模拟游戏。
|

|
||||||
|
|
||||||
|
我父亲一直很喜欢火车模型,我记得我小时候,曾看着他在圣诞树周围建了一整条轨道。当 [乐高][2] 火车套装发布时,因其便利性和固有可扩展性,我们转而投向了乐高火车的怀抱。多年来,我们热衷于建造和改装乐高火车及单轨轨道。我经常想象,未来我会有一个车库或地下室,专门用于微型景观和电动汽笛火车。强调一下,我沉迷于另一个爱好的可能性非常低,所以当发现 _虚拟_ 模型铁路可以为我提供相同的满足感时,我很开心。我的虚拟爱好引擎是 [OpenTTD][3],这是一款基于名为 **Transport Tycoon Deluxe** 的 90 年代老游戏的开源模拟游戏。
|
||||||
|
|
||||||
### 安装 OpenTTD
|
### 安装 OpenTTD
|
||||||
|
|
||||||
@ -25,7 +26,7 @@
|
|||||||
$ sudo apt install ./openttd*deb
|
$ sudo apt install ./openttd*deb
|
||||||
```
|
```
|
||||||
|
|
||||||
如果你在使用其他 Linux 发行版,请下载通用安装程序,并使用 [`tar` 命令][6]解压缩包:
|
如果你在使用其他 Linux 发行版,请下载通用安装程序,并使用 [tar 命令][6]解压缩包:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ tar xvf openttd-x.yy.z-linux*.tar.xz
|
$ tar xvf openttd-x.yy.z-linux*.tar.xz
|
||||||
@ -44,51 +45,51 @@ $ cd openttd*
|
|||||||
$ ./openttd &
|
$ ./openttd &
|
||||||
```
|
```
|
||||||
|
|
||||||
首次启动 OpenTTD 时,游戏会提示必须下载图形集,在 Steam 版中会自动安装,但在独立应用程序中需要单击一下鼠标。无论如何,因为 OpenTTD 是开源的,经过了很好的改进,所以在默认图形之外,你最终还会下载的还有很多其他图形。
|
首次启动 OpenTTD 时,游戏会提示必须下载图像集,在 Steam 版中会自动安装,但在独立应用程序中需要单击一下鼠标。无论如何,因为 OpenTTD 是开源的,经过了很好的改进,所以在默认图像之外,你最终还会下载的还有很多其他图像。
|
||||||
|
|
||||||
下载图形集后,你会看到一个古色古香的小型界面。我觉得 640x480 的界面有点小,虽然旧图形界面确实更有年代感(那时计算能力还比较弱),但一些适配现代屏幕的轻度升级还是很好用的。因此,您的第一步操作就是点击“<ruby>**检查在线内容**<rt>Check online content</rt></ruby>”按钮。
|
下载图像集后,你会看到一个古色古香的小型界面。我觉得 640x480 的界面有点小,虽然旧图像界面确实更有年代感(那时计算能力还比较弱),但一些适配现代屏幕的轻度升级还是很好用的。因此,你的第一步操作就是点击“<ruby>检查在线内容<rt>Check online content</rt></ruby>”按钮。
|
||||||
|
|
||||||
### 加载模组
|
### 加载模组
|
||||||
|
|
||||||
“<ruby>**内容下载**<rt>Content downloading</rt></ruby>”界面是一个查看已通过审查的 OpenTTD <ruby>模组<rt>mod</rt></ruby>的窗口,可以提供个性化的改进图形界面、全新音乐、火车模型和地图名称。我使用了新西兰全套配置,所以对我来说,生成的所有城市都很熟悉,尽管 2020 年我转而开始使用“辐射 3”套装了。模组 _非常多_,可以使用右上角的搜索栏来缩小选择范围。
|
“<ruby>内容下载<rt>Content downloading</rt></ruby>”界面是一个查看已通过审查的 OpenTTD <ruby>模组<rt>mod</rt></ruby>的窗口,可以提供个性化的改进图像界面、全新音乐、火车模型和地图名称。我使用了新西兰全套配置,所以对我来说,生成的所有城市都很熟悉,尽管 2020 年我转而开始使用“辐射 3”套装了。模组 _非常多_,可以使用右上角的搜索栏来缩小选择范围。
|
||||||
|
|
||||||
下面是一些个人认为必备的模组:
|
下面是一些个人认为必备的模组:
|
||||||
|
|
||||||
* **abase** \- 高分辨率图形。将近 300 MB,这可能是你玩此游戏需要的最大一次下载(游戏本身只有 50 MB)。
|
* **abase** - 高分辨率图像。将近 300 MB,这可能是你玩此游戏需要的最大一次下载(游戏本身只有 50 MB)。
|
||||||
* **OpenSFX** \- 一个声音合集。让你能听到城市中的交通声、船运的喇叭声以及很棒的火车汽笛声。
|
* **OpenSFX** - 一个声音合集。让你能听到城市中的交通声、船运的喇叭声以及很棒的火车汽笛声。
|
||||||
* **Town names** \- 城镇名称。默认的城市名称很有趣,但我认为记一些本地化的名称更容易。
|
* **Town names** - 城镇名称。默认的城市名称很有趣,但我认为记一些本地化的名称更容易。
|
||||||
* **Trains** \- 火车模组。OpenTTD 有一组运行良好的默认火车模型,但如果你已经是一名火车观察员,那你可能会喜欢下载一些额外的火车模型。我使用的是 NZR 火车合集,但还有很多火车也是可用的,包括来自英国、美国、奥地利、比利时、捷克共和国的车,以及按字母表顺序排列的许多其他火车。
|
* **Trains** - 火车模组。OpenTTD 有一组运行良好的默认火车模型,但如果你已经是一名火车观察员,那你可能会喜欢下载一些额外的火车模型。我使用的是 NZR 火车合集,但还有很多火车也是可用的,包括来自英国、美国、奥地利、比利时、捷克共和国的车,以及按字母表顺序排列的许多其他火车。
|
||||||
* **Beginner tutorial** \- 新手教程。是一个帮你学习游戏及界面的引导场景。
|
* **Beginner tutorial** - 新手教程。是一个帮你学习游戏及界面的引导场景。
|
||||||
|
|
||||||
### 游戏引擎默认值
|
### 游戏引擎默认值
|
||||||
|
|
||||||
下载新“资产”后,你需要将它们设置为默认值。有两个设置的地方:游戏引擎默认值、游戏内脚本与资产。
|
下载新素材后,你需要将它们设置为默认值。有两个设置的地方:游戏引擎默认值、游戏内脚本与素材。
|
||||||
|
|
||||||
![OpenTTD main menu][8]
|
![OpenTTD main menu][8]
|
||||||
|
|
||||||
OpenTTD 菜单(Seth Kenlon, [CC BY-SA 4.0][9])
|
*OpenTTD 菜单(Seth Kenlon, [CC BY-SA 4.0][9])*
|
||||||
|
|
||||||
单击“<ruby>**游戏选项**<rt>Game Options</rt></ruby>”按钮。 在**游戏选项**屏幕中,调整以下设置:
|
单击“<ruby>游戏选项<rt>Game Options</rt></ruby>”按钮。 在游戏选项屏幕中,调整以下设置:
|
||||||
|
|
||||||
* 将<ruby>**屏幕分辨率**<rt>screen resolution</rt></ruby>设置为你喜欢的界面尺寸。
|
* 将<ruby>屏幕分辨率<rt>screen resolution</rt></ruby>设置为你喜欢的界面尺寸。
|
||||||
* 将<ruby>**基础图形集** <rt>base graphics set</rt></ruby>设置为 **abase**。
|
* 将<ruby>基础图像集 <rt>base graphics set</rt></ruby>设置为 **abase**。
|
||||||
* 将<ruby>**基础声音设置**<rt>base sounds set</rt></ruby>设置为 **OpenSFX**。
|
* 将<ruby>基础声音设置<rt>base sounds set</rt></ruby>设置为 **OpenSFX**。
|
||||||
|
|
||||||
关闭**游戏选项**屏幕。你的改动会自动保存。
|
关闭游戏选项屏幕。你的改动会自动保存。
|
||||||
|
|
||||||
### 游戏选项
|
### 游戏选项
|
||||||
|
|
||||||
在主菜单界面,单击“<ruby>**NewGRF 设置**<rt>NewGRF Settings</rt></ruby>”按钮。
|
在主菜单界面,单击“<ruby>NewGRF 设置<rt>NewGRF Settings</rt></ruby>”按钮。
|
||||||
|
|
||||||
![NewGRF settings window][10]
|
![NewGRF settings window][10]
|
||||||
|
|
||||||
NewGRF 设置菜单(Seth Kenlon, [CC BY-SA 4.0][9])
|
*NewGRF 设置菜单(Seth Kenlon, [CC BY-SA 4.0][9])*
|
||||||
|
|
||||||
未活动的模组显示在 **NewGRF 设置**窗口的下半部分。要激活一个未活动的模组,请选择它并单击左下角的“<ruby>**添加**<rt>Add</rt></ruby>”按钮。选择要激活的模组后,再单击“<ruby>**应用**<rt>Apply</rt></ruby>”按钮。
|
未活动的模组显示在 NewGRF 设置窗口的下半部分。要激活一个未活动的模组,请选择它并单击左下角的“<ruby>添加<rt>Add</rt></ruby>”按钮。选择要激活的模组后,再单击“<ruby>应用<rt>Apply</rt></ruby>”按钮。
|
||||||
|
|
||||||
### 教程
|
### 教程
|
||||||
|
|
||||||
如果你下载了“<ruby>**初学者教程**<rt>Beginner tutorial</rt></ruby>”场景,可以通过它来学习 OpenTTD。开始教程请单击主菜单屏幕顶部附近的“<ruby>**播放场景**<rt>Play scenario</rt></ruby>” 按钮,然后选择该教程并开始。
|
如果你下载了“<ruby>初学者教程<rt>Beginner tutorial</rt></ruby>”场景,可以通过它来学习 OpenTTD。开始教程请单击主菜单屏幕顶部附近的“<ruby>播放场景<rt>Play scenario</rt></ruby>” 按钮,然后选择该教程并开始。
|
||||||
|
|
||||||
初学者教程有着游戏界面的完整浏览流程,全部完成需要花费一些时间。
|
初学者教程有着游戏界面的完整浏览流程,全部完成需要花费一些时间。
|
||||||
|
|
||||||
@ -96,25 +97,25 @@ NewGRF 设置菜单(Seth Kenlon, [CC BY-SA 4.0][9])
|
|||||||
|
|
||||||
现在我们快速介绍一下,此处你要了解以下内容:车辆出自仓库,一切活动都需要时间表。记住这两条规则,你可以立即开始建造火车(以及道路、海港和机场)。
|
现在我们快速介绍一下,此处你要了解以下内容:车辆出自仓库,一切活动都需要时间表。记住这两条规则,你可以立即开始建造火车(以及道路、海港和机场)。
|
||||||
|
|
||||||
#### **建造车站**
|
#### 建造车站
|
||||||
|
|
||||||
要在两个城市之间建立一条简单的铁路线,请单击顶部图标栏中的铁路轨道图标。
|
要在两个城市之间建立一条简单的铁路线,请单击顶部图标栏中的铁路轨道图标。
|
||||||
|
|
||||||
![New icon bar - railway option][11]
|
![New icon bar - railway option][11]
|
||||||
|
|
||||||
新建图标栏——铁路选项(Seth Kenlon, [CC BY-SA 4.0][9])
|
*新建图标栏——铁路选项(Seth Kenlon, [CC BY-SA 4.0][9])*
|
||||||
|
|
||||||
铁路以车站开始和结束,所以我通常在预定线路的两端各放置一个车站。单击火车站图标(将鼠标悬停在其上方可查看其标签)。一个火车站要服务于一个地区,其作用范围必须与该地区尽量多地重叠。要查看车站的覆盖范围,请通过单击车站对话框底部的“<ruby>**开启**<rt>On</rt></ruby>”按钮以启用<ruby>**覆盖区域高亮**<rt>Coverage area highlight</rt></ruby>功能。
|
铁路以车站开始和结束,所以我通常在预定线路的两端各放置一个车站。单击火车站图标(将鼠标悬停在其上方可查看其标签)。一个火车站要服务于一个地区,其作用范围必须与该地区尽量多地重叠。要查看车站的覆盖范围,请通过单击车站对话框底部的“<ruby>开启<rt>On</rt></ruby>”按钮以启用<ruby>覆盖区域高亮<rt>Coverage area highlight</rt></ruby>功能。
|
||||||
|
|
||||||
![Station coverage window][12]
|
![Station coverage window][12]
|
||||||
|
|
||||||
车站覆盖信息窗口(Seth Kenlon, [CC BY-SA 4.0][9])
|
*车站覆盖信息窗口(Seth Kenlon, [CC BY-SA 4.0][9])*
|
||||||
|
|
||||||
黑色网格表示覆盖范围,而白色网格显示车站的物理占据范围。当你将鼠标悬停在一个区域上时,车站的覆盖范围所需耗材会在弹出窗口中列出。从简单的开始,创建一个单轨 4 辆车的站台。在地图上的两个城市之间重复执行此操作两次。
|
黑色网格表示覆盖范围,而白色网格显示车站的物理占据范围。当你将鼠标悬停在一个区域上时,车站的覆盖范围所需耗材会在弹出窗口中列出。从简单的开始,创建一个单轨 4 辆车的站台。在地图上的两个城市之间重复执行此操作两次。
|
||||||
|
|
||||||
![create station menu][13]
|
![create station menu][13]
|
||||||
|
|
||||||
创建车站菜单(Seth Kenlon, [CC BY-SA 4.0][9])
|
*创建车站菜单(Seth Kenlon, [CC BY-SA 4.0][9])*
|
||||||
|
|
||||||
### 铺设铁轨
|
### 铺设铁轨
|
||||||
|
|
||||||
@ -124,21 +125,21 @@ NewGRF 设置菜单(Seth Kenlon, [CC BY-SA 4.0][9])
|
|||||||
|
|
||||||
### 火车车库
|
### 火车车库
|
||||||
|
|
||||||
火车来自<ruby>车库<rt>depot</rt></ruby>。因此,要在铁路上添加火车,必须在沿线的某处添加一个车库。单击车库图标并在现有铁路附近放置。将车库连接到现有轨道,以确保您的火车可以从车库到达适当线路的(在此简单示例中,线路是唯一的)。
|
火车来自<ruby>车库<rt>depot</rt></ruby>。因此,要在铁路上添加火车,必须在沿线的某处添加一个车库。单击车库图标并在现有铁路附近放置。将车库连接到现有轨道,以确保你的火车可以从车库到达适当线路的(在此简单示例中,线路是唯一的)。
|
||||||
|
|
||||||
![create depot menu][14]
|
![create depot menu][14]
|
||||||
|
|
||||||
建造车库菜单(Seth Kenlon, [CC BY-SA 4.0][9])
|
*建造车库菜单(Seth Kenlon, [CC BY-SA 4.0][9])*
|
||||||
|
|
||||||
### 模型火车
|
### 模型火车
|
||||||
|
|
||||||
终于,你可以将虚拟模型火车添加到虚拟铁路中了。要创建火车,请单击车库。
|
终于,你可以将虚拟模型火车添加到虚拟铁路中了。要创建火车,请单击车库。
|
||||||
|
|
||||||
单击站点窗口底部的“<ruby>**新建车辆**<rt>New Vehicle</rt></ruby>”按钮,会列出可用的火车引擎和汽车。列表会部分取决于你从可下载内容中添加的模型。一般来说,发动机分为三种:蒸汽发动机、柴油发动机和电动发动机。游戏内时间从 1950 年开始,所以早期你只有蒸汽可选。随着时间推进,你会获得可用于升级的创新型新模型。
|
单击站点窗口底部的“<ruby>新建车辆<rt>New Vehicle</rt></ruby>”按钮,会列出可用的火车引擎和汽车。列表会部分取决于你从可下载内容中添加的模型。一般来说,发动机分为三种:蒸汽发动机、柴油发动机和电动发动机。游戏内时间从 1950 年开始,所以早期你只有蒸汽可选。随着时间推进,你会获得可用于升级的创新型新模型。
|
||||||
|
|
||||||
![create train menu][15]
|
![create train menu][15]
|
||||||
|
|
||||||
创建火车菜单(Seth Kenlon, [CC BY-SA 4.0][9])
|
*创建火车菜单(Seth Kenlon, [CC BY-SA 4.0][9])*
|
||||||
|
|
||||||
现在创建一个简单的火车,其中包括一节引擎、一节客车和一节邮车。如果想添加其他类型的车厢,请单击站点以确认它们的可提供车型(由其覆盖区域决定)
|
现在创建一个简单的火车,其中包括一节引擎、一节客车和一节邮车。如果想添加其他类型的车厢,请单击站点以确认它们的可提供车型(由其覆盖区域决定)
|
||||||
|
|
||||||
@ -150,15 +151,15 @@ NewGRF 设置菜单(Seth Kenlon, [CC BY-SA 4.0][9])
|
|||||||
|
|
||||||
![create schedule menu][16]
|
![create schedule menu][16]
|
||||||
|
|
||||||
创建时刻表菜单(Seth Kenlon, [CC BY-SA 4.0][9])
|
*创建时刻表菜单(Seth Kenlon, [CC BY-SA 4.0][9])*
|
||||||
|
|
||||||
要创建时间表,请单击时间表窗口底部的“<ruby>**前往**<rt>Go To</rt></ruby>”按钮,然后单击要设置成第一个目的地的车站。然后点击下一站。你可以在时间表中选择一个停靠点,浏览“<ruby>**满载**<rt>Full load</rt></ruby>”和“<ruby>**卸载**<rt>Unload</rt></ruby>”下拉菜单中的选项,以此调整装卸要求,并且可以在“<ruby>**无停靠**<rt>Non-stop</rt></ruby>”下拉菜单中调整路线(如果开发了新路线)。选项有很多,随着城市发展和地图完善,你可能需要随时调整策略。
|
要创建时间表,请单击时间表窗口底部的“<ruby>前往<rt>Go To</rt></ruby>”按钮,然后单击要设置成第一个目的地的车站。然后点击下一站。你可以在时间表中选择一个停靠点,浏览“<ruby>满载<rt>Full load</rt></ruby>”和“<ruby>卸载<rt>Unload</rt></ruby>”下拉菜单中的选项,以此调整装卸要求,并且可以在“<ruby>无停靠<rt>Non-stop</rt></ruby>”下拉菜单中调整路线(如果开发了新路线)。选项有很多,随着城市发展和地图完善,你可能需要随时调整策略。
|
||||||
|
|
||||||
但是现在,单击火车视口底部的红色“<ruby>**已停止**<rt>Stopped</rt></ruby>”按钮,让火车投入使用吧!
|
但是现在,单击火车视口底部的红色“<ruby>已停止<rt>Stopped</rt></ruby>”按钮,让火车投入使用吧!
|
||||||
|
|
||||||
![train moving from station to station][17]
|
![train moving from station to station][17]
|
||||||
|
|
||||||
在役中的火车(Seth Kenlon, [CC BY-SA 4.0][9])
|
*在役中的火车(Seth Kenlon, [CC BY-SA 4.0][9])*
|
||||||
|
|
||||||
### 试试 OpenTTD 吧
|
### 试试 OpenTTD 吧
|
||||||
|
|
||||||
@ -173,7 +174,7 @@ via: https://opensource.com/article/21/9/model-trains-openttd
|
|||||||
作者:[Seth Kenlon][a]
|
作者:[Seth Kenlon][a]
|
||||||
选题:[lujun9972][b]
|
选题:[lujun9972][b]
|
||||||
译者:[unigeorge](https://github.com/unigeorge)
|
译者:[unigeorge](https://github.com/unigeorge)
|
||||||
校对:[校对者ID](https://github.com/校对者ID)
|
校对:[wxy](https://github.com/wxy)
|
||||||
|
|
||||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||||
|
|
114
published/20211019 Linux Tablets- What are Your Options.md
Normal file
114
published/20211019 Linux Tablets- What are Your Options.md
Normal file
@ -0,0 +1,114 @@
|
|||||||
|
[#]: subject: "Linux Tablets: What are Your Options?"
|
||||||
|
[#]: via: "https://itsfoss.com/linux-tablets/"
|
||||||
|
[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/"
|
||||||
|
[#]: collector: "lujun9972"
|
||||||
|
[#]: translator: "wxy"
|
||||||
|
[#]: reviewer: "wxy"
|
||||||
|
[#]: publisher: "wxy"
|
||||||
|
[#]: url: "https://linux.cn/article-13929-1.html"
|
||||||
|
|
||||||
|
有哪些 Linux 平板电脑可供选择
|
||||||
|
======
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
有很多 [基于 Linux 的笔记本电脑][1],也有 [预装了 Linux 的迷你 PC][2],而市场上还有一些 [基于 Linux 的智能手机][3]。
|
||||||
|
|
||||||
|
那平板电脑呢?有没有一些不错的基于 Linux 的平板电脑?这可能不能用一句话说清楚。
|
||||||
|
|
||||||
|
许多仅使用 Linux 的系统制造商专注于制造台式电脑。这主要是由于触摸设备上的 Linux 体验与安卓和 iOS 提供的体验相距甚远。
|
||||||
|
|
||||||
|
但这是否意味着你不能在平板电脑上使用 Linux?并非如此。对于早期尝试用户和 DIY 爱好者来说,还有一些选择的。让我们来看看在这些 Linux 平板电脑中,你有哪些选择。
|
||||||
|
|
||||||
|
### Ubuntu Touch
|
||||||
|
|
||||||
|
![BQ 平板电脑上的 Ubuntu Touch 操作系统][4]
|
||||||
|
|
||||||
|
好吧!这不是一个平板电脑,而是一个操作系统。但它确实让你可以在一些旧的安卓平板电脑上安装一个适合触摸操作的 Ubuntu 版本。
|
||||||
|
|
||||||
|
注意“一些”这个词。Ubuntu Touch 官方 [支持][5] Nexus 7、联想 M10、Xperia Z4 和 BQ Aquaris 平板。你甚至可以尝试在你的其他平板电脑上安装 Ubuntu Touch。它可能无法 100% 工作,但仍然非常有用。
|
||||||
|
|
||||||
|
[Ubuntu Touch][8] 是 Ubuntu 团队的一个项目,但是他们 [在 2017 年中止了它][6]。[UBports][7] 承担了继续这个项目的责任,他们在有限的资源下做的很棒。
|
||||||
|
|
||||||
|
总而言之,如果你喜欢各种实验,想让你的旧安卓平板电脑获得新生,Ubuntu Touch 可能是你的周末项目。
|
||||||
|
|
||||||
|
### PineTab
|
||||||
|
|
||||||
|
![PineTab][9]
|
||||||
|
|
||||||
|
Pine64 始于其单板计算机 Pine A64,以作为 [树莓派的替代品][10]。随着时间的推移,它推出了几个 Pine 品牌的产品。这份名单里包括低调的 [PineTime 智能手表][11]、PineBook 笔记本电脑、PinePhone 智能手机和 PineTab 平板电脑。
|
||||||
|
|
||||||
|
这些 Pine 设备通常价格低廉,并允许用户对这些小设备进行完全控制。这种可魔改的特性帮助它聚集了一大批开源 DIY 爱好者的粉丝。
|
||||||
|
|
||||||
|
[PineTab][12] 基本上使用了与带有触摸屏和键盘的 Pine64 单板计算机相同的组件。它不是看起来最漂亮的平板电脑,也不打算成为这样的。
|
||||||
|
|
||||||
|
它的规格很一般,有一个高清 IPS 电容式触摸屏、全志 A64 芯片组、四核 CPU 和 2GB 内存。
|
||||||
|
|
||||||
|
它无法与 iPad 或 Galaxy Tab 竞争,但它允许你安装你选择的发行版,并按你的要求进行配置。
|
||||||
|
|
||||||
|
请记住,Pine 的库存有限,所以如果你能看到这个设备可以购买,那你很幸运。
|
||||||
|
|
||||||
|
### PineNote
|
||||||
|
|
||||||
|
![PineNote][13]
|
||||||
|
|
||||||
|
另一个 Pine 设备,与你在上一节看到的 PineTab 略有不同。
|
||||||
|
|
||||||
|
PineTab 是一款用于浏览互联网、使用应用程序和玩游戏的 Linux 平板电脑,而 [PineNote][14] 是用来做笔记和阅读书籍和文件的。
|
||||||
|
|
||||||
|
它有一个电子墨水显示屏,你可能在 Kindle 等电子书阅读器上见过。除了电子书阅读器之外,PineNote 还可以你用 Wacom 笔做笔记。
|
||||||
|
|
||||||
|
PineNote 拥有四核 Rockchip、多点触控电子墨水面板、4GB 内存和 128GB eMMC 存储。它也是为数不多的价格高于通常的 399 美元的平板点之一。
|
||||||
|
|
||||||
|
请记住,PineNote 正处于早期开发阶段,只接受开发者的订单。
|
||||||
|
|
||||||
|
### RasPad
|
||||||
|
|
||||||
|
![RasPad][18]
|
||||||
|
|
||||||
|
[RasPad][19] 是一个用于树莓派设备的套件,可以把它变成一个基于触摸功能的设备。与普通的平板不同,这不是一个扁平的设备,而是有一个楔形的身体。这使得它更容易在办公桌上使用。
|
||||||
|
|
||||||
|
RasPad 是专门为树莓派设备创建的,你可以轻松使用它的大部分端口。它有一个专门的 RasPad 操作系统,但你可以自由使用常规的树莓派操作系统或 Ubuntu 或任何其他适合树莓派的操作系统。在选择操作系统时请考虑触控友好性。
|
||||||
|
|
||||||
|
请记住,树莓派设备不包括在套件中。你必须要单独购买。
|
||||||
|
|
||||||
|
### 你的选择是什么?
|
||||||
|
|
||||||
|
我知道我们离一个优秀的 Linux 平板电脑还很远,但它们至少可以和市场上的安卓平板电脑竞争。至少我们有一些可用的选择,这也是一线希望。
|
||||||
|
|
||||||
|
你是否已经拥有以上列出的设备之一了?你的体验如何?
|
||||||
|
|
||||||
|
如果你只能选择其中之一,那么你选择哪一款 Linux 平板电脑?
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
via: https://itsfoss.com/linux-tablets/
|
||||||
|
|
||||||
|
作者:[Abhishek Prakash][a]
|
||||||
|
选题:[lujun9972][b]
|
||||||
|
译者:[wxy](https://github.com/wxy)
|
||||||
|
校对:[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/lujun9972
|
||||||
|
[1]: https://linux.cn/article-13672-1.html
|
||||||
|
[2]: https://itsfoss.com/linux-based-mini-pc/
|
||||||
|
[3]: https://linux.cn/article-13711-1.html
|
||||||
|
[4]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/10/ubuntu-touch.jpg?resize=755%2C537&ssl=1
|
||||||
|
[5]: https://devices.ubuntu-touch.io/
|
||||||
|
[6]: https://itsfoss.com/ubuntu-unity-shutdown/
|
||||||
|
[7]: https://ubports.com/
|
||||||
|
[8]: https://ubuntu-touch.io/
|
||||||
|
[9]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/10/PineTab.jpg?resize=800%2C742&ssl=1
|
||||||
|
[10]: https://itsfoss.com/raspberry-pi-alternatives/
|
||||||
|
[11]: https://itsfoss.com/pinetime-linux-smartwatch/
|
||||||
|
[12]: https://pine64.com/product/pinetab-10-1-linux-tablet-with-detached-backlit-keyboard/?v=0446c16e2e66
|
||||||
|
[13]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/10/PineNote-tab.jpg?resize=800%2C615&ssl=1
|
||||||
|
[14]: https://www.pine64.org/pinenote/
|
||||||
|
[15]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/09/jingpad-keyboard-angle.webp?resize=800%2C600&ssl=1
|
||||||
|
[16]: https://itsfoss.com/jingpad-a1-review/
|
||||||
|
[17]: https://en.jingos.com/jingpad-a1/
|
||||||
|
[18]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/10/raspad.webp?resize=800%2C614&ssl=1
|
||||||
|
[19]: https://raspad.com/products/raspadv3
|
@ -0,0 +1,92 @@
|
|||||||
|
[#]: subject: "Why Mark Text is my favorite markdown editor"
|
||||||
|
[#]: via: "https://opensource.com/article/21/10/mark-text-markdown-editor"
|
||||||
|
[#]: author: "Don Watkins https://opensource.com/users/don-watkins"
|
||||||
|
[#]: collector: "lujun9972"
|
||||||
|
[#]: translator: "wxy"
|
||||||
|
[#]: reviewer: "wxy"
|
||||||
|
[#]: publisher: "wxy"
|
||||||
|
[#]: url: "https://linux.cn/article-13926-1.html"
|
||||||
|
|
||||||
|
Mark Text:我最喜欢的 Markdown 编辑器
|
||||||
|
======
|
||||||
|
|
||||||
|
> Mark Text 拥有的工具使得撰写 Markdown 变得容易,同时又提供了一个不会打扰我的简单的界面。
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
几年前,当我开始使用 Jupyter 笔记本时,我接触到了 Markdown 格式。许多作者都知道 Markdown,但这是我不熟悉的一种技能。
|
||||||
|
|
||||||
|
Markdown 是一种标准的文本写作方式,在这种方式中,你可以用精简的符号来标记你想要的文本样式。例如,你不用点击一个按钮来使一个词变粗体,而是用两个星号(`**word**`)包围这个词。这有两种效果:
|
||||||
|
|
||||||
|
* 当作为纯文本查看时,视觉上显示出强调的文本
|
||||||
|
* 如果有一个好的文本转换器或渲染器(如 Pandoc 或一个好的 Markdown 文本编辑器),就会显示为加粗。
|
||||||
|
|
||||||
|
Markdown 最大的优点之一是它的大部分符号都是直观的,并且来自我们大多数人已有的习惯。它使得用星号强调单词,用字符标记标题以区分它们等等变得很自然。
|
||||||
|
|
||||||
|
每个人都对它评价很高,但我不确定为什么我需要学习和使用 Markdown。然而,我是一个好奇的人,我开始探索 Markdown,以及它如何在我的写作中发挥作用。
|
||||||
|
|
||||||
|
### 学习 Markdown
|
||||||
|
|
||||||
|
我很喜欢在学习时使用 [Markdown 速查表][2]。我发现 Markdown 是一个很好的工具,可以写任何内容,而且我很喜欢甚至不需要一个专门的 Markdown 编辑器这一点。任何文本编辑器都可以写 Markdown,因为 Markdown 使用标准文本来表示样式。我开始使用简单的编辑器,如 Vim 或 gedit(或任何其他编辑器),并查阅这个速查表以记住简单的格式化规则。
|
||||||
|
|
||||||
|
今年我一直在写日记,作为组织我的想法和学习更多关于 Markdown 的方法。我最近尝试了 [Ghostwriter][3] 文本编辑器,这是一个优秀的编辑器,有一些额外的 Markdown 特定功能。Markdown 现在已经变得非常流行了,许多编辑器都加入了语法高亮、提示和其他使 Markdown 编写变得容易的功能,或者将其作为重点。它们不是必须的功能,但当你拥有它们时,还是很好的。
|
||||||
|
|
||||||
|
### 尝试 Mark Text
|
||||||
|
|
||||||
|
在阅读一个博客时,我发现了 [Mark Text][4]。Mark Text 使写 Markdown 变得很容易,同时提供了一个简单的界面,而且又不影响我。Mark Text 有六个主题,三个浅色和三个深色主题。深色主题对我来说更容易使用。它的 [用户文档][5] 非常好,而且也提供了 Markdown 的 [语法帮助][6]。
|
||||||
|
|
||||||
|
### Markdown 的实时预览
|
||||||
|
|
||||||
|
Mark Text 以简洁的界面提供了实时预览功能。它支持 [Commonmark][7] 规范、Github 风格的 Markdown 规范,以及 Pandoc Markdown。据其网站说,Mark Text 还支持 KaTex、front matter 和 emoji 等 Markdown 扩展。它还可以输出 HTML 和 PDF 文件。
|
||||||
|
|
||||||
|
Mark Text 有各种编辑模式,如打字模式、源代码模式和专注模式。添加图片是一件很容易的事,因为你可以简单地从剪贴板上复制和粘贴它们。
|
||||||
|
|
||||||
|
在 Mark Text 窗口的左上方有一个弹出窗口,显示迄今为止输入的字符和段落数量。作为一个作家,这真的很有帮助。
|
||||||
|
|
||||||
|
从 Mark Text 窗口左上方的菜单或使用 `Ctrl+S` 保存文件很容易。事实上,Mark Text 的菜单对任何习惯于基本文本编辑器或文字处理器的人来说都是友好和熟悉的。
|
||||||
|
|
||||||
|
![Mark Text 文件菜单][8]
|
||||||
|
|
||||||
|
我喜欢 Mark Text 用简单的快捷键支持各种格式,包括表格块、图表、行内格式、数学公式块和其他代码块。
|
||||||
|
|
||||||
|
你可以从以下链接中为你的操作系统下载 Mark Text:
|
||||||
|
|
||||||
|
* [Linux][10]
|
||||||
|
* [macOS][11]
|
||||||
|
* [Windows][12]
|
||||||
|
|
||||||
|
Mark Text 以 [MIT][13] 许可证开源。你可以随时 [下载][14] 最新的版本。
|
||||||
|
|
||||||
|
另外,你可以用 `brew install --cask mark-text` 在 macOS 上安装 Mark Text,在 Windows 上用 [Chocolatey][15] 输入 `choco install marktext` 来安装它。
|
||||||
|
|
||||||
|
Mark Text 一直在寻找赞助商和开发者。该项目有一个给贡献者的 [指南][16]。此外,你可以在 Patreon 和 Open Collective 上支持该项目。
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
via: https://opensource.com/article/21/10/mark-text-markdown-editor
|
||||||
|
|
||||||
|
作者:[Don Watkins][a]
|
||||||
|
选题:[lujun9972][b]
|
||||||
|
译者:[wxy](https://github.com/wxy)
|
||||||
|
校对:[wxy](https://github.com/wxy)
|
||||||
|
|
||||||
|
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||||
|
|
||||||
|
[a]: https://opensource.com/users/don-watkins
|
||||||
|
[b]: https://github.com/lujun9972
|
||||||
|
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/osdc-docdish-typewriterkeys-3.png?itok=NyBwMdK_ (Typewriter keys in multicolor)
|
||||||
|
[2]: https://opensource.com/downloads/cheat-sheet-markdown
|
||||||
|
[3]: https://wereturtle.github.io/ghostwriter/
|
||||||
|
[4]: https://marktext.app/
|
||||||
|
[5]: https://github.com/marktext/marktext/blob/master/docs/README.md
|
||||||
|
[6]: https://github.com/marktext/marktext/blob/master/docs/MARKDOWN_SYNTAX.md
|
||||||
|
[7]: https://commonmark.org/
|
||||||
|
[8]: https://opensource.com/sites/default/files/uploads/mark-test-file-menu.png (Mark Text file menu)
|
||||||
|
[9]: https://creativecommons.org/licenses/by-sa/4.0/
|
||||||
|
[10]: https://github.com/marktext/marktext/releases/latest/download/marktext-x86_64.AppImage
|
||||||
|
[11]: https://github.com/marktext/marktext/releases/latest/download/marktext.dmg
|
||||||
|
[12]: https://github.com/marktext/marktext/releases/latest/download/marktext-setup.exe
|
||||||
|
[13]: https://github.com/marktext/marktext/blob/develop/LICENSE
|
||||||
|
[14]: https://github.com/marktext/marktext/releases
|
||||||
|
[15]: https://chocolatey.org/
|
||||||
|
[16]: https://github.com/marktext/marktext/blob/develop/CONTRIBUTING.md
|
@ -3,20 +3,22 @@
|
|||||||
[#]: author: "Marco Carmona https://itsfoss.com/author/marco/"
|
[#]: author: "Marco Carmona https://itsfoss.com/author/marco/"
|
||||||
[#]: collector: "lujun9972"
|
[#]: collector: "lujun9972"
|
||||||
[#]: translator: "geekpi"
|
[#]: translator: "geekpi"
|
||||||
[#]: reviewer: " "
|
[#]: reviewer: "wxy"
|
||||||
[#]: publisher: " "
|
[#]: publisher: "wxy"
|
||||||
[#]: url: " "
|
[#]: url: "https://linux.cn/article-13922-1.html"
|
||||||
|
|
||||||
GitUI: 用 Rust 编写的 Git 的快速命令行客户端
|
GitUI: 用 Rust 编写的 Git 的快速命令行客户端
|
||||||
======
|
======
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
[基本的 Git 命令][1] 对于通常的克隆、添加、提交推送已经足够好了。
|
[基本的 Git 命令][1] 对于通常的克隆、添加、提交推送已经足够好了。
|
||||||
|
|
||||||
但如果你在一个有多个贡献者的大型项目上工作,你可能需要将事情可视化。GUI 工具可以让你更好地了解 diff、stash 和 blame 的情况。
|
但如果你在一个有多个贡献者的大型项目上工作,你可能需要将事情可视化。GUI 工具可以让你更好地了解 `diff`、`stash` 和 `blame` 的情况。
|
||||||
|
|
||||||
但是,如果你常用终端,想要 Git 的舒适性,我为你准备了一个好工具。
|
但是,如果你常用终端,又想要 Git 的舒适性,我为你准备了一个好工具。
|
||||||
|
|
||||||
它叫 GitUI,它提供了类似于 Git GUI 的用户体验和舒适度,但就在你的终端中。它是可移植的、快速的、免费的和开源的。
|
它叫 GitUI,它提供了类似于 Git GUI 的用户体验和舒适度,但就在你的终端中。它是可移植的、快速的、自由而开源的。
|
||||||
|
|
||||||
### GitUI:一个基于终端的 Git 工具
|
### GitUI:一个基于终端的 Git 工具
|
||||||
|
|
||||||
@ -24,21 +26,21 @@ GitUI: 用 Rust 编写的 Git 的快速命令行客户端
|
|||||||
|
|
||||||
GitUI 的开发者在项目的 README 文件中分享了一些基准数据。
|
GitUI 的开发者在项目的 README 文件中分享了一些基准数据。
|
||||||
|
|
||||||
| 时间 |内存(GB)| 二进制(MB)| 冻结 | 崩溃
|
名称 | 时间 |内存(GB)| 二进制(MB)| 冻结 | 崩溃
|
||||||
---|---|---|---|---|---
|
---|---|---|---|---|---
|
||||||
gitui | 24 s | 0.17 | 1.4 | 否 | 否
|
gitui | 24 s | 0.17 | 1.4 | 否 | 否
|
||||||
lazygit | 57 s | 2.6 | 16 | 是 | 有时
|
lazygit | 57 s | 2.6 | 16 | 是 | 有时
|
||||||
tig | 4 m 20 s | 1.3 | 0.6 | 有时 | 否
|
tig | 4 m 20 s | 1.3 | 0.6 | 有时 | 否
|
||||||
|
|
||||||
GitUI、LazyGit 和 Tig 之间的比较。Git 的简单用户界面
|
*GitUI、LazyGit 和 Tig 之间的比较。*
|
||||||
|
|
||||||
这种优化大部分来自于 Rust 语言的使用。
|
这种优化大部分来自于 Rust 语言的使用。
|
||||||
|
|
||||||
_**注意:该程序处于早期开发阶段,还没有为生产做好准备。**_
|
**注意:该程序处于早期开发阶段,还没有为生产做好准备。**
|
||||||
|
|
||||||
### 在 Linux 上安装 GitUI
|
### 在 Linux 上安装 GitUI
|
||||||
|
|
||||||
不用说,你应该已经[在你的系统上安装了 Git][5]。
|
不用说,你应该已经 [在你的系统上安装了 Git][5]。
|
||||||
|
|
||||||
要使用 GitUI,首先需要 [为你的 Linux 发行版安装 Rust 支持][6]。
|
要使用 GitUI,首先需要 [为你的 Linux 发行版安装 Rust 支持][6]。
|
||||||
|
|
||||||
@ -62,19 +64,19 @@ source $HOME/.cargo/env
|
|||||||
cargo install gitui
|
cargo install gitui
|
||||||
```
|
```
|
||||||
|
|
||||||
然后你就可以使用 GitUI了,只需在终端输入 `gitui`就可以运行了。我做了一些示例文件来测试 Git 和 GitUI。
|
然后你就可以使用 GitUI了,只需在终端输入 `gitui` 就可以运行了。我做了一些示例文件来测试 Git 和 GitUI。
|
||||||
|
|
||||||
![Starting gitui on terminal][8]
|
![Starting gitui on terminal][8]
|
||||||
|
|
||||||
值得一提的是,这个界面有一个快速而直观的纯键盘控制。一切都很简单,只需输入正确的字母即可将文件暂存、提交、分支或推送到 git 仓库中。
|
值得一提的是,这个界面有一个快速而直观的纯键盘控制。一切都很简单,只需输入正确的字母即可将文件暂存、提交、分支或推送到 git 仓库中。
|
||||||
|
|
||||||
真正让我兴奋的是,你不仅可以做之前的四个动作,还可以**编辑**每个文件,**拉取**它,**blame** 它,在其中**导航**等等,这一切都无需退出界面。 很棒,不是吗?
|
真正让我兴奋的是,你不仅可以做之前的四个动作,还可以**编辑**每个文件,**拉取**它,**追溯** 它,在其中**导航**等等,这一切都无需退出界面。 很棒,不是吗?
|
||||||
|
|
||||||
![More functions inside the interface][9]
|
![More functions inside the interface][9]
|
||||||
|
|
||||||
祝贺你! 现在你知道了如何安装 GitUI 以及它在你的终端中的样子。
|
祝贺你! 现在你知道了如何安装 GitUI 以及它在你的终端中的样子。
|
||||||
|
|
||||||
如果你喜欢这个项目,请在 [GitHub][2] 上启动它的仓库。如果你使用其他工具来管理 Git,请在评论区提出你的建议。
|
如果你喜欢这个项目,请在 [GitHub][2] 上点赞它的仓库。如果你使用其他工具来管理 Git,请在评论区提出你的建议。
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
@ -83,7 +85,7 @@ via: https://itsfoss.com/gitui/
|
|||||||
作者:[Marco Carmona][a]
|
作者:[Marco Carmona][a]
|
||||||
选题:[lujun9972][b]
|
选题:[lujun9972][b]
|
||||||
译者:[geekpi](https://github.com/geekpi)
|
译者:[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/) 荣誉推出
|
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||||
|
|
@ -0,0 +1,174 @@
|
|||||||
|
[#]: subject: "How to Install Rust and Cargo on Ubuntu and Other Linux Distributions"
|
||||||
|
[#]: via: "https://itsfoss.com/install-rust-cargo-ubuntu-linux/"
|
||||||
|
[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/"
|
||||||
|
[#]: collector: "lujun9972"
|
||||||
|
[#]: translator: "perfiffer"
|
||||||
|
[#]: reviewer: "wxy"
|
||||||
|
[#]: publisher: "wxy"
|
||||||
|
[#]: url: "https://linux.cn/article-13938-1.html"
|
||||||
|
|
||||||
|
如何在 Ubuntu 和其它的 Linux 发行版安装 Rust 和 Cargo
|
||||||
|
======
|
||||||
|
|
||||||
|
> 了解在 Linux 上安装 Rust 编程语言及其包管理器 Cargo 的各种方法。
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
自从 Mozilla 贡献了 [Rust][1] 语言之后,它就获得了更加突出和受欢迎的地位。口说无凭。[Rust 将被使用在 Linux 内核中][2],它是继 C 语言之后的第二种编程语言。
|
||||||
|
|
||||||
|
许多开发人员也开始使用 Rust 语言制作很棒的基于命令行的工具。这些工具通常可以通过 [Cargo 包管理器][3] 获得。
|
||||||
|
|
||||||
|
这就是为什么在 Linux 中安装 Rust 支持对程序员和最终用户都很重要的原因。
|
||||||
|
|
||||||
|
官方 Rust 文档建议通过以下这种方式下载并执行安装程序脚本在 Linux 中安装 Rust:
|
||||||
|
|
||||||
|
```
|
||||||
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
||||||
|
```
|
||||||
|
|
||||||
|
这是可行的。但是,你的发行版可能已经打包了 Rust。使用你的发行版的 [包管理器][4] 也是一种选择。
|
||||||
|
|
||||||
|
让我向你介绍官方 Rust 方式和包管理器方式的 Rust 安装步骤。
|
||||||
|
|
||||||
|
### 方法1:使用官方方法在任意的 Linux 上安装 Rust
|
||||||
|
|
||||||
|
这种方法有几个优点:
|
||||||
|
|
||||||
|
* 你可以获取最新的 Rust 和 Cargo 版本
|
||||||
|
* Rust 仅仅是为当前的用户安装,并不是所有用户
|
||||||
|
* 你并不需要 root 用户或者 `sudo` 权限就可以为自己安装 Rust
|
||||||
|
|
||||||
|
一些人不喜欢从互联网下载并 [运行 shell][5] 脚本,即使它来自官方。但是,由于它不需要 root 访问权限并且脚本来自官方,因此以这种方式安装它应该是安全的。
|
||||||
|
|
||||||
|
首先,确保你已经安装了 `curl`。如果没安装,使用你的发行版的包管理器安装它。你可以使用 `apt` 命令在 [Ubuntu 和 Debian 上安装 Curl][6]。
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo apt install curl
|
||||||
|
```
|
||||||
|
|
||||||
|
接下来,使用这条命令下载脚本并运行它:
|
||||||
|
|
||||||
|
```
|
||||||
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
||||||
|
```
|
||||||
|
|
||||||
|
![][7]
|
||||||
|
|
||||||
|
它会询问你输入所需的安装类型。选择选项 `1`:
|
||||||
|
|
||||||
|
![][8]
|
||||||
|
|
||||||
|
脚本完成安装后,你需要获取配置文件的来源,以使更改应用于你的 shell。
|
||||||
|
|
||||||
|
![][9]
|
||||||
|
|
||||||
|
应用文件:
|
||||||
|
|
||||||
|
```
|
||||||
|
source $HOME/.cargo/env
|
||||||
|
```
|
||||||
|
|
||||||
|
完成后,通过检查已安装的版本来验证 Rust 是否可用:
|
||||||
|
|
||||||
|
```
|
||||||
|
rustc --version
|
||||||
|
```
|
||||||
|
|
||||||
|
![Verifying Rust installation][10]
|
||||||
|
|
||||||
|
太酷了。如果 Rust 发布了新版本,你可以使用如下命令更新已安装的版本:
|
||||||
|
|
||||||
|
```
|
||||||
|
rustup update
|
||||||
|
```
|
||||||
|
|
||||||
|
在你看到其它安装方法之前,让我快速展示如何移除以这种方式安装的 Rust。
|
||||||
|
|
||||||
|
#### 删除以官方方式安装的 Rust
|
||||||
|
|
||||||
|
在终端中,使用如下的命令从系统中移除 Rust:
|
||||||
|
|
||||||
|
```
|
||||||
|
rustup self uninstall
|
||||||
|
```
|
||||||
|
|
||||||
|
询问时按 `Y`,你将从系统中删除 Rust。
|
||||||
|
|
||||||
|
![Removing Rust from Linux][11]
|
||||||
|
|
||||||
|
官方方式安装已经完成。让我们看看如何使用 `apt` 命令在 Ubuntu 上安装 Rust。
|
||||||
|
|
||||||
|
### 方法2:使用 apt 命令在 Ubuntu 上安装 Rust
|
||||||
|
|
||||||
|
为什么要使用包管理器?
|
||||||
|
|
||||||
|
* 它在整个系统范围内安装 Rust,可供系统上的所有用户使用
|
||||||
|
* 它与其它系统更新一起集中更新(如果你的发行版添加了新版本的 Rust)
|
||||||
|
|
||||||
|
Ubuntu 中有两个主要的 Rust 包:
|
||||||
|
|
||||||
|
* `rustc`:用于 Rust 编程语言的 Rust 编译器
|
||||||
|
* `cargo`:Cargo 是 Rust 的包管理器,它会自动安装 `rustc`
|
||||||
|
|
||||||
|
作为一个普通用户,你将使用 Cargo 来安装基于 Rust 的应用程序。作为程序员,你需要 Cargo 来获取其它 Rust 包或创建自己的包。
|
||||||
|
|
||||||
|
由于 `cargo` 包含 `rustc`,所以我建议安装它,以便一次性安装所有必需的软件包。
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo apt install cargo
|
||||||
|
```
|
||||||
|
|
||||||
|
系统会要求你输入账号密码。
|
||||||
|
|
||||||
|
![][12]
|
||||||
|
|
||||||
|
当然,你可以自由使用 `apt install rustc`,只安装 Rust。这取决于你的选择。
|
||||||
|
|
||||||
|
你可以验证是否为你和所有其他用户安装了 Rust(如果你愿意):
|
||||||
|
|
||||||
|
![][13]
|
||||||
|
|
||||||
|
很好。让我也快速展示卸载步骤。
|
||||||
|
|
||||||
|
#### 使用 apt remove 移除 Rust
|
||||||
|
|
||||||
|
要移除 Rust,你可以先移除 Cargo,然后使用 `autoremove` 命令移除随它安装的依赖项。
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo apt remove cargo
|
||||||
|
```
|
||||||
|
|
||||||
|
现在运行 `autoremove`:
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo apt autoremove
|
||||||
|
```
|
||||||
|
|
||||||
|
就是这样。你现在了解了在 Ubuntu 和其它 Linux 发行版上安装 Rust 的所有基本知识。随时欢迎提出问题和建议。
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
via: https://itsfoss.com/install-rust-cargo-ubuntu-linux/
|
||||||
|
|
||||||
|
作者:[Abhishek Prakash][a]
|
||||||
|
选题:[lujun9972][b]
|
||||||
|
译者:[perfiffer](https://github.com/perfiffer)
|
||||||
|
校对:[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/lujun9972
|
||||||
|
[1]: https://www.rust-lang.org/
|
||||||
|
[2]: https://www.zdnet.com/article/rust-in-the-linux-kernel-why-it-matters-and-whats-happening-next/
|
||||||
|
[3]: https://crates.io/
|
||||||
|
[4]: https://itsfoss.com/package-manager/
|
||||||
|
[5]: https://itsfoss.com/run-shell-script-linux/
|
||||||
|
[6]: https://itsfoss.com/install-curl-ubuntu/
|
||||||
|
[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/10/installing-rust-linux-1.png?resize=800%2C448&ssl=1
|
||||||
|
[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/10/installing-rust-linux-2.png?resize=800%2C448&ssl=1
|
||||||
|
[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/10/installing-rust-linux-3.png?resize=800%2C448&ssl=1
|
||||||
|
[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/10/verify-rust-version.png?resize=800%2C236&ssl=1
|
||||||
|
[11]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/10/remove-rust-linux.png?resize=800%2C378&ssl=1
|
||||||
|
[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/10/install-rust-using-apt-ubuntu.png?resize=759%2C481&ssl=1
|
||||||
|
[13]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/10/verify-rust-install-ubuntu.png?resize=741%2C329&ssl=1
|
133
published/20211021 How to Convert a Webpage to PDF in Linux.md
Normal file
133
published/20211021 How to Convert a Webpage to PDF in Linux.md
Normal file
@ -0,0 +1,133 @@
|
|||||||
|
[#]: subject: "How to Convert a Webpage to PDF in Linux"
|
||||||
|
[#]: via: "https://itsfoss.com/convert-webpage-pdf-linux/"
|
||||||
|
[#]: author: "Ankush Das https://itsfoss.com/author/ankush/"
|
||||||
|
[#]: collector: "lujun9972"
|
||||||
|
[#]: translator: "geekpi"
|
||||||
|
[#]: reviewer: "wxy"
|
||||||
|
[#]: publisher: "wxy"
|
||||||
|
[#]: url: "https://linux.cn/article-13928-1.html"
|
||||||
|
|
||||||
|
如何在 Linux 下将网页转换为 PDF 文件
|
||||||
|
======
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
当你将某些资源存档或用于教育目的时,将网页保存为 PDF 是很方便的。
|
||||||
|
|
||||||
|
但是,你如何在 Linux 中把一个网页转换成 PDF?
|
||||||
|
|
||||||
|
你可以选择使用每个 Linux 发行版上的网页浏览器(GUI),或者使用终端将网页变成 PDF 文件。
|
||||||
|
|
||||||
|
在这里,我将提到这两种方法来帮助你完成工作。
|
||||||
|
|
||||||
|
### 方法 1:使用网页浏览器将网页转换为 PDF 文件
|
||||||
|
|
||||||
|
尽管我在本教程中使用的是 Mozilla Firefox,但你也可以用任何 [可用于 Linux 的最佳浏览器][1] 做同样的事情。
|
||||||
|
|
||||||
|
![][2]
|
||||||
|
|
||||||
|
1、加载你想转换的网页。
|
||||||
|
|
||||||
|
2、在浏览器菜单中找到“**打印**”选项,或使用键盘快捷键 `Ctrl + P`。
|
||||||
|
|
||||||
|
3、默认情况下,它应该让你把它保存为 PDF。你需要点击“保存”,然后选择目的地并保存网页。
|
||||||
|
|
||||||
|
![Save webpage as PDF in Mozilla Firefox][3]
|
||||||
|
|
||||||
|
这种简单方法的一个主要问题是,它包括页面上的所有元素。这可能包括评论、页脚等。你可以用一个 PDF 编辑器来删除部分内容,但这是一个额外的任务。
|
||||||
|
|
||||||
|
更好的选择是利用一个浏览器扩展,如 [Print Friendly][4]。它允许你在下载 PDF 之前编辑和删除网页的部分内容。
|
||||||
|
|
||||||
|
### 方法 2:使用终端将网页转换为 PDF 或图片
|
||||||
|
|
||||||
|
你可能已经知道,你可以 [在 Linux 终端浏览互联网][5],甚至 [使用命令行下载文件][6]。这并不奇怪,因为你可以在终端中做更多的事情,包括将网页下载为 PDF。
|
||||||
|
|
||||||
|
一个灵巧的开源命令行工具 `wkhtmltopdf` 和 `wkhtmltoimage` 可以帮到你,让你把任何 HTML 网页转换成 PDF 或图像文件。
|
||||||
|
|
||||||
|
它使用 Qt WebKit 渲染引擎来完成这个任务。你可以浏览它的 [GitHub页面][7] 了解更多信息。
|
||||||
|
|
||||||
|
你应该能够从你的 Linux 发行版的默认仓库中安装它。对于基于 Ubuntu 的发行版,你可以输入以下命令:
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo apt install wkhtmltopdf
|
||||||
|
```
|
||||||
|
|
||||||
|
无论你想把它转换为 PDF 还是图像文件,它的使用都是非常直接的:
|
||||||
|
|
||||||
|
![][8]
|
||||||
|
|
||||||
|
要将一个网页转换成 PDF,请输入:
|
||||||
|
|
||||||
|
```
|
||||||
|
wkhtmltopdf URL/domain filename.pdf
|
||||||
|
```
|
||||||
|
|
||||||
|
比如,类似于这样:
|
||||||
|
|
||||||
|
```
|
||||||
|
wkhtmltopdf linuxmint.com mint.pdf
|
||||||
|
```
|
||||||
|
|
||||||
|
你可以选择使用 `https://linuxmint.com` 这样完整的 URL 或使用域名,如上面的例子所示。
|
||||||
|
|
||||||
|
默认情况下,生成的文件将保存在主目录下。
|
||||||
|
|
||||||
|
在转换网页时,你还可以得到一些好玩的选项。
|
||||||
|
|
||||||
|
例如,你可以**对 PDF 文件应用灰度过滤器**,在同一文件中**制作多个页面副本**,以及在转换过程中**排除**图像。
|
||||||
|
|
||||||
|
灰度过滤器不一定对每个网页都有效,但你可以用命令试试:
|
||||||
|
|
||||||
|
```
|
||||||
|
wkhtmltopdf -g google.com googlepage.pdf
|
||||||
|
```
|
||||||
|
|
||||||
|
要在同一个 PDF 文件中复制多个页面,命令是:
|
||||||
|
|
||||||
|
```
|
||||||
|
wkhtmltopdf --copies 2 linuxmint.com mint.pdf
|
||||||
|
```
|
||||||
|
|
||||||
|
而且,如果你想排除网页中的图像,只需输入:
|
||||||
|
|
||||||
|
```
|
||||||
|
wkhtmltopdf --no-images linuxmint.com mint.pdf
|
||||||
|
```
|
||||||
|
|
||||||
|
此外,如果你想把一个网页转换为图像,命令是这样的:
|
||||||
|
|
||||||
|
```
|
||||||
|
wkhtmltoimage linuxmint.com mint.png
|
||||||
|
```
|
||||||
|
|
||||||
|
注意,与使用浏览器的 GUI 方法不同,通过终端使用这些工具有其局限性。它似乎不能成功转换利用任何 `<iframe>` 代码片段的网页。
|
||||||
|
|
||||||
|
像我们的网站,甚至 DuckDuckGo 都没有转换为 PDF 或图像。然而,简单的 HTML 网站,如 Linuxmint.com、Ubuntu.com、Google.com 则非常有效。
|
||||||
|
|
||||||
|
### 总结
|
||||||
|
|
||||||
|
使用浏览器将网页保存为 PDF 似乎是个好办法。但是,如果你想有更多的选择并通过终端,`wkhtmltopdf` 工具应该会派上用场。
|
||||||
|
|
||||||
|
你喜欢如何在 Linux 中把网页转换为 PDF?欢迎在评论中分享你的想法。
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
via: https://itsfoss.com/convert-webpage-pdf-linux/
|
||||||
|
|
||||||
|
作者:[Ankush Das][a]
|
||||||
|
选题:[lujun9972][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/ankush/
|
||||||
|
[b]: https://github.com/lujun9972
|
||||||
|
[1]: https://itsfoss.com/best-browsers-ubuntu-linux/
|
||||||
|
[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/10/mozilla-save-webpage-pdf.png?resize=800%2C536&ssl=1
|
||||||
|
[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/10/mozilla-firefox-print-pdf-1.png?resize=602%2C584&ssl=1
|
||||||
|
[4]: https://www.printfriendly.com/
|
||||||
|
[5]: https://itsfoss.com/terminal-web-browsers/
|
||||||
|
[6]: https://itsfoss.com/download-files-from-linux-terminal/
|
||||||
|
[7]: https://github.com/wkhtmltopdf/wkhtmltopdf
|
||||||
|
[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/10/htmltopdf-mint.png?resize=736%2C344&ssl=1
|
@ -0,0 +1,115 @@
|
|||||||
|
[#]: subject: "How to Install themes on Xubuntu and Other Distros Using Xfce Desktop Environment"
|
||||||
|
[#]: via: "https://itsfoss.com/install-themes-xfce-xubuntu/"
|
||||||
|
[#]: author: "Ankush Das https://itsfoss.com/author/ankush/"
|
||||||
|
[#]: collector: "lujun9972"
|
||||||
|
[#]: translator: "geekpi"
|
||||||
|
[#]: reviewer: "wxy"
|
||||||
|
[#]: publisher: "wxy"
|
||||||
|
[#]: url: "https://linux.cn/article-13932-1.html"
|
||||||
|
|
||||||
|
如何在使用 Xfce 桌面环境的 Xubuntu 上安装主题
|
||||||
|
======
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
> 这是一个循序渐进的初学者教程,展示了如何在 Xubuntu 和其他使用 Xfce 桌面环境的 Linux 发行版中安装主题和图标。
|
||||||
|
|
||||||
|
在 Xubuntu 上安装主题与 Ubuntu 或其他 Linux 发行版类似。你把主题文件放在 `~/.themes` 文件夹中,然后用一个工具来改变它。
|
||||||
|
|
||||||
|
然而,考虑到 Xubuntu 使用 [Xfce 桌面环境][1],一些选项或用户界面看起来会有所不同。这就是为什么我创建了这个教程,用适当的截图来展示步骤。
|
||||||
|
|
||||||
|
### 在 Xubuntu(Xfce)中安装新主题
|
||||||
|
|
||||||
|
开始前,你需要在主目录下创建一个 `.themes` 文件夹。注意文件夹名称前的点(`.`)。它很重要,可以从正常的视图中隐藏该文件夹。
|
||||||
|
|
||||||
|
要检查你是否已经有了它,你可以 [启用查看隐藏文件][2],然后在它不存在的时候创建它。
|
||||||
|
|
||||||
|
![][3]
|
||||||
|
|
||||||
|
完成后,你需要下载一个主题。
|
||||||
|
|
||||||
|
1、你可以在 [Xfce-look][4] 门户网站上浏览 XFCE 主题。你所要做的就是下载存档(压缩)文件。
|
||||||
|
|
||||||
|
2、接下来,你需要 [解压缩文件][5],如下面的截图所示。
|
||||||
|
|
||||||
|
![][6]
|
||||||
|
|
||||||
|
3、解压后,你会发现出现一个文件夹,你要复制它。
|
||||||
|
|
||||||
|
![][7]
|
||||||
|
|
||||||
|
4、然后你要把这个文件夹粘贴到你最初创建的 `.themes` 目录中。
|
||||||
|
|
||||||
|
![][8]
|
||||||
|
|
||||||
|
5、最后,你需要到外观设置中找到它,并选择它/应用它以使其生效。
|
||||||
|
|
||||||
|
![][9]
|
||||||
|
|
||||||
|
正如你在下面的截图中注意到的,新的主题已经被添加和应用:
|
||||||
|
|
||||||
|
![][10]
|
||||||
|
|
||||||
|
除了主题之外,如果你需要定制你的 Xubuntu 桌面的图标,你需要在主目录中创建另一个 `.icons` 文件夹。
|
||||||
|
|
||||||
|
就像你安装主题一样,你将不得不遵循一个类似的过程来应用图标主题。
|
||||||
|
|
||||||
|
为了给你一个例子,让我在这里强调这些步骤:
|
||||||
|
|
||||||
|
### 在 Xubuntu(Xfce) 中添加图标主题
|
||||||
|
|
||||||
|
你可以浏览同样的 [xfce-look portal][11] 来寻找完整的图标主题。
|
||||||
|
|
||||||
|
或者,你可以寻找一些最好的 [可用于 Ubuntu 的图标主题][12],它们应该也适用于 Xubuntu。
|
||||||
|
|
||||||
|
一旦你找到了你喜欢的,就下载它,并按下面的方式解压。
|
||||||
|
|
||||||
|
![][13]
|
||||||
|
|
||||||
|
接下来,你需要把这个文件夹复制并粘贴到 `.icons` 文件夹中。
|
||||||
|
|
||||||
|
![][14]
|
||||||
|
|
||||||
|
现在,你可以回到外观设置中,找到列在“图标”下的可用图标。
|
||||||
|
|
||||||
|
为了向你展示区别,**我把默认的 Xubuntu 主题改为 adwaita-dark**,你可以在这里看到:
|
||||||
|
|
||||||
|
![][15]
|
||||||
|
|
||||||
|
**注意**:一些图标或主题文件可能包含有不同变体的嵌套文件夹。你会注意到它们并没有出现在外观工具中。如果是这种情况,直接将内部文件夹复制到 `~/.themes` 或 `~/.icons` 文件夹中。
|
||||||
|
|
||||||
|
### 总结
|
||||||
|
|
||||||
|
通过对风格和图标的调整,你可以 [定制你的 Xubuntu 体验][16] 以融入你的品味。
|
||||||
|
|
||||||
|
你是喜欢默认的 Xubuntu 外观还是使用不同的主题/图标来定制它的外观?请在评论中告诉我你的想法。
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
via: https://itsfoss.com/install-themes-xfce-xubuntu/
|
||||||
|
|
||||||
|
作者:[Ankush Das][a]
|
||||||
|
选题:[lujun9972][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/ankush/
|
||||||
|
[b]: https://github.com/lujun9972
|
||||||
|
[1]: https://xfce.org/
|
||||||
|
[2]: https://itsfoss.com/hide-folders-and-show-hidden-files-in-ubuntu-beginner-trick/
|
||||||
|
[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/10/xubuntu-hidden-files.png?resize=674%2C300&ssl=1
|
||||||
|
[4]: https://www.xfce-look.org/browse?cat=138&ord=latest
|
||||||
|
[5]: https://itsfoss.com/unzip-linux/
|
||||||
|
[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/10/extract-xubuntu-theme.png?resize=719%2C537&ssl=1
|
||||||
|
[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/10/extracted-xubuntu-theme.png?resize=709%2C272&ssl=1
|
||||||
|
[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/10/copy-theme-xubuntu.png?resize=705%2C328&ssl=1
|
||||||
|
[9]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/10/appearance-xfce.png?resize=703%2C544&ssl=1
|
||||||
|
[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/10/xpro-xubuntu-theme.png?resize=1162%2C599&ssl=1
|
||||||
|
[11]: https://www.xfce-look.org/browse?cat=132&ord=latest
|
||||||
|
[12]: https://itsfoss.com/best-icon-themes-ubuntu-16-04/
|
||||||
|
[13]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/10/xubuntu-icon-theme.png?resize=756%2C560&ssl=1
|
||||||
|
[14]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/10/xubuntu-icon-theme-selection.png?resize=739%2C534&ssl=1
|
||||||
|
[15]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/10/xubuntu-icon-theme-change.png?resize=1154%2C619&ssl=1
|
||||||
|
[16]: https://itsfoss.com/customize-xfce/
|
280
published/20211025 Use Rust for embedded development.md
Normal file
280
published/20211025 Use Rust for embedded development.md
Normal file
@ -0,0 +1,280 @@
|
|||||||
|
[#]: subject: "Use Rust for embedded development"
|
||||||
|
[#]: via: "https://opensource.com/article/21/10/rust-embedded-development"
|
||||||
|
[#]: author: "Alan Smithee https://opensource.com/users/alansmithee"
|
||||||
|
[#]: collector: "lujun9972"
|
||||||
|
[#]: translator: "wxy"
|
||||||
|
[#]: reviewer: "wxy"
|
||||||
|
[#]: publisher: "wxy"
|
||||||
|
[#]: url: "https://linux.cn/article-13921-1.html"
|
||||||
|
|
||||||
|
使用 Rust 进行嵌入式开发
|
||||||
|
======
|
||||||
|
|
||||||
|
> Rust 的高性能、高可靠性和高生产力使它适合于嵌入式系统。
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
在过去的几年里,Rust 在程序员中获得了热情的追捧。技术潮流来来去去,所以很难将仅仅因为某项新技术而产生的兴奋与对某项技术的优点的兴奋区分开来,但我认为 Rust 是一种真正设计良好的语言。它的目标是帮助开发者建立可靠和高效的软件,而且它从一开始就是为这个目的设计的。你可能听过一些 Rust 的关键特性,在这篇文章中,我会证明这些特性正是 Rust 也恰好适合嵌入式系统的原因。比如:
|
||||||
|
|
||||||
|
* 高性能:它速度快,内存利用率高
|
||||||
|
* 可靠性:在编译过程中可以消除内存错误
|
||||||
|
* 生产力:很棒的文档,友好的编译器,有用的错误信息,以及一流的工具化。它有一个集成的包管理器和构建工具,智能的多编辑器支持自动补完和类型检查、自动格式化等等。
|
||||||
|
|
||||||
|
### 为什么使用 Rust 进行嵌入式开发?
|
||||||
|
|
||||||
|
Rust 的设计是为了保证安全和高性能。嵌入式软件会出现的问题主要是内存的问题。从某种程度上说,Rust 是一种面向编译器的语言,所以你可以确保在编译时安全使用内存。以下是使用 Rust 在嵌入式设备上开发的一些好处:
|
||||||
|
|
||||||
|
* 强大的静态分析
|
||||||
|
* 灵活的内存
|
||||||
|
* 无畏的并发性
|
||||||
|
* 互操作性
|
||||||
|
* 可移植性
|
||||||
|
* 社区驱动
|
||||||
|
|
||||||
|
在这篇文章中,我使用开源的 [RT-Thread 操作系统][2] 来演示如何使用 Rust 进行嵌入式开发。
|
||||||
|
|
||||||
|
### 如何在 C 语言中调用 Rust
|
||||||
|
|
||||||
|
在 C 代码中调用 Rust 代码时,你必须将 Rust 源代码打包成静态库文件。当 C 代码编译时,将其链接进去。
|
||||||
|
|
||||||
|
#### 用 Rust 创建一个静态库
|
||||||
|
|
||||||
|
在这个过程中,有两个步骤:
|
||||||
|
|
||||||
|
1、使用 `cargo init --lib rust_to_c` 在 Clion 中建立一个 `lib` 库。在 `lib.rs` 中加入以下代码。下面的函数计算两个类型为 `i32` 的值的总和并返回结果:
|
||||||
|
|
||||||
|
```
|
||||||
|
#![no_std]
|
||||||
|
use core::panic::PanicInfo;
|
||||||
|
|
||||||
|
#[no_mangle]
|
||||||
|
pub extern "C" fn sum(a: i32, b: i32) -> i32 {
|
||||||
|
a + b
|
||||||
|
}
|
||||||
|
|
||||||
|
#[panic_handler]
|
||||||
|
fn panic(_info:&PanicInfo) -> !{
|
||||||
|
loop{}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
2、在你的 `Cargo.toml` 文件中添加以下代码,以告诉 Rustc 要生成什么类型的库:
|
||||||
|
|
||||||
|
```
|
||||||
|
[lib]
|
||||||
|
name = "sum"
|
||||||
|
crate-type = ["staticlib"]
|
||||||
|
path = "src/lib.rs"
|
||||||
|
```
|
||||||
|
|
||||||
|
#### 交叉编译
|
||||||
|
|
||||||
|
你可以针对你的目标平台进行交叉编译。假设你的嵌入式系统是基于 Arm 的,步骤很简单:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ rustup target add armv7a-none-eabi
|
||||||
|
```
|
||||||
|
|
||||||
|
生成静态库文件:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ cargo build --target=armv7a-none-eabi --release --verbose
|
||||||
|
Fresh rust_to_c v0.1.0
|
||||||
|
Finished release [optimized] target(s) in 0.01s
|
||||||
|
```
|
||||||
|
|
||||||
|
#### 生成头文件
|
||||||
|
|
||||||
|
你也需要头文件:
|
||||||
|
|
||||||
|
1、安装 [cbindgen][3]。`cbindgen` 工具会从 Rust 库中生成一个 C 或 C++11 的头文件:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ cargo install --force cbindgen
|
||||||
|
```
|
||||||
|
|
||||||
|
2、在你的项目文件夹下创建一个新的 `cbindgen.toml` 文件。
|
||||||
|
|
||||||
|
3、生成一个头文件:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ cbindgen --config cbindgen.toml --crate rust_to_c --output sum.h
|
||||||
|
```
|
||||||
|
|
||||||
|
#### 调用 Rust 库文件
|
||||||
|
|
||||||
|
现在你可以对你的 Rust 库进行调用了。
|
||||||
|
|
||||||
|
1、把生成的 `sum.h` 和 `sum.a` 文件放到 `rt-thread/bsp/qemu-vexpress-a9/applications` 目录下。
|
||||||
|
|
||||||
|
2、修改 `SConscript` 文件并添加一个静态库:
|
||||||
|
|
||||||
|
```
|
||||||
|
from building import *
|
||||||
|
|
||||||
|
cwd = GetCurrentDir()
|
||||||
|
src = Glob('*.c') + Glob('*.cpp')
|
||||||
|
CPPPATH = [cwd]
|
||||||
|
|
||||||
|
LIBS = ["libsum.a"]
|
||||||
|
LIBPATH = [GetCurrentDir()]
|
||||||
|
|
||||||
|
group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH, LIBS = LIBS, LIBPATH = LIBPATH)
|
||||||
|
|
||||||
|
Return('group')
|
||||||
|
```
|
||||||
|
|
||||||
|
3、在主函数中调用 `sum` 函数,得到返回值,并 `printf` 该值:
|
||||||
|
|
||||||
|
```
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <rtthread.h>
|
||||||
|
#include "sum.h"
|
||||||
|
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
int32_t tmp;
|
||||||
|
|
||||||
|
tmp = sum(1, 2);
|
||||||
|
printf("call rust sum(1, 2) = %d\n", tmp);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
4、在 RT-Thread [Env][4] 环境中,使用 `scons` 来编译项目并运行:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ scons -j6
|
||||||
|
scons: Reading SConscript files ...
|
||||||
|
scons: done reading SConscript files.
|
||||||
|
scons: Building targets ...
|
||||||
|
[...]
|
||||||
|
scons: done building targets.
|
||||||
|
|
||||||
|
$ qemu.sh
|
||||||
|
\ | /
|
||||||
|
- RT - Thread Operating System
|
||||||
|
/ | \ 4.0.4 build Jul 28 2021
|
||||||
|
2006 - 2021 Copyright by rt-thread team
|
||||||
|
lwIP-2.1.2 initialized!
|
||||||
|
[...]
|
||||||
|
call rust sum(1, 2) = 3
|
||||||
|
```
|
||||||
|
|
||||||
|
### 加、减、乘、除
|
||||||
|
|
||||||
|
你可以在 Rust 中实现一些复杂的数学运算。在 `lib.rs` 文件中,使用 Rust 语言来实现加、减、乘、除:
|
||||||
|
|
||||||
|
```
|
||||||
|
#![no_std]
|
||||||
|
use core::panic::PanicInfo;
|
||||||
|
|
||||||
|
#[no_mangle]
|
||||||
|
pub extern "C" fn add(a: i32, b: i32) -> i32 {
|
||||||
|
a + b
|
||||||
|
}
|
||||||
|
|
||||||
|
#[no_mangle]
|
||||||
|
pub extern "C" fn subtract(a: i32, b: i32) -> i32 {
|
||||||
|
a - b
|
||||||
|
}
|
||||||
|
|
||||||
|
#[no_mangle]
|
||||||
|
pub extern "C" fn multiply(a: i32, b: i32) -> i32 {
|
||||||
|
a * b
|
||||||
|
}
|
||||||
|
|
||||||
|
#[no_mangle]
|
||||||
|
pub extern "C" fn divide(a: i32, b: i32) -> i32 {
|
||||||
|
a / b
|
||||||
|
}
|
||||||
|
|
||||||
|
#[panic_handler]
|
||||||
|
fn panic(_info:&PanicInfo) -> !{
|
||||||
|
loop{}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
构建你的库文件和头文件,并把它们放在应用程序目录中。使用 `scons` 来编译。如果在链接过程中出现错误,请在官方 [Github 页面][5] 中找到解决方案。
|
||||||
|
|
||||||
|
修改 `rtconfig.py` 文件,并添加链接参数 `--allow-multiple-definition`:
|
||||||
|
|
||||||
|
```
|
||||||
|
DEVICE = ' -march=armv7-a -marm -msoft-float'
|
||||||
|
CFLAGS = DEVICE + ' -Wall'
|
||||||
|
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -D__ASSEMBLY__ -I.'
|
||||||
|
LINK_SCRIPT = 'link.lds'
|
||||||
|
LFLAGS = DEVICE + ' -nostartfiles -Wl,--gc-sections,-Map=rtthread.map,-cref,-u,system_vectors,--allow-multiple-definition'+\
|
||||||
|
' -T %s' % LINK_SCRIPT
|
||||||
|
|
||||||
|
CPATH = ''
|
||||||
|
LPATH = ''
|
||||||
|
```
|
||||||
|
|
||||||
|
编译并运行 QEMU 来看看你的工作。
|
||||||
|
|
||||||
|
### 在 Rust 中调用 C 语言
|
||||||
|
|
||||||
|
Rust 可以在 C 代码中调用,但是如何在你的 Rust 代码中调用 C 呢?下面是一个在 Rust 代码中调用 `rt_kprintf` C 函数的例子。
|
||||||
|
|
||||||
|
首先,修改 `lib.rs` 文件:
|
||||||
|
|
||||||
|
```
|
||||||
|
// The imported rt-thread functions list
|
||||||
|
extern "C" {
|
||||||
|
pub fn rt_kprintf(format: *const u8, ...);
|
||||||
|
}
|
||||||
|
|
||||||
|
#[no_mangle]
|
||||||
|
pub extern "C" fn add(a: i32, b: i32) -> i32 {
|
||||||
|
unsafe {
|
||||||
|
rt_kprintf(b"this is from rust\n" as *const u8);
|
||||||
|
}
|
||||||
|
a + b
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
接下来,生成库文件:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ cargo build --target=armv7a-none-eabi --release --verbose
|
||||||
|
Compiling rust_to_c v0.1.0
|
||||||
|
Running `rustc --crate-name sum --edition=2018 src/lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type staticlib --emit=dep-info,link -C opt-level=3 -C embed-bitcode=no -C metadata=a
|
||||||
|
Finished release [optimized] target(s) in 0.11s
|
||||||
|
```
|
||||||
|
|
||||||
|
而现在,要运行代码,将 Rust 生成的库文件复制到应用程序目录中,然后重新构建:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ scons -j6 scons: Reading SConscript files ... scons: done reading SConscript files. [...]
|
||||||
|
scons: Building targets ... scons: done building targets.
|
||||||
|
```
|
||||||
|
|
||||||
|
再次运行 QEMU,可以在你的嵌入式镜像中看到结果。
|
||||||
|
|
||||||
|
### 你可以拥有这一切
|
||||||
|
|
||||||
|
在你的嵌入式开发中使用 Rust,你可以获得 Rust 的所有功能,而不需要牺牲灵活性或稳定性。今天就在你的嵌入式系统上试试 Rust 吧。关于嵌入式 Rust 的过程(以及 RT-Thread 本身)的更多信息,请查看 RT-Thread 项目的 [YouTube 频道][6]。请记住,嵌入式也可以是开放的。
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
via: https://opensource.com/article/21/10/rust-embedded-development
|
||||||
|
|
||||||
|
作者:[Alan Smithee][a]
|
||||||
|
选题:[lujun9972][b]
|
||||||
|
译者:[wxy](https://github.com/wxy)
|
||||||
|
校对:[wxy](https://github.com/wxy)
|
||||||
|
|
||||||
|
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||||
|
|
||||||
|
[a]: https://opensource.com/users/alansmithee
|
||||||
|
[b]: https://github.com/lujun9972
|
||||||
|
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/rust_programming_crab_sea.png?itok=2eWLz8A5 (Ferris the crab under the sea, unofficial logo for Rust programming language)
|
||||||
|
[2]: https://github.com/RT-Thread/rt-thread
|
||||||
|
[3]: https://github.com/eqrion/cbindgen
|
||||||
|
[4]: https://www.rt-thread.io/download.html?download=Env
|
||||||
|
[5]: https://github.com/rust-lang/compiler-builtins/issues/353
|
||||||
|
[6]: https://www.youtube.com/channel/UCdDHtIfSYPq4002r27ffqP
|
@ -0,0 +1,118 @@
|
|||||||
|
[#]: subject: "Fixing “Unable to acquire dpkg frontend lock. Are You Root?” Error on Ubuntu and Other Linux Distributions"
|
||||||
|
[#]: via: "https://itsfoss.com/fixed-are-you-root-error/"
|
||||||
|
[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/"
|
||||||
|
[#]: collector: "lujun9972"
|
||||||
|
[#]: translator: "geekpi"
|
||||||
|
[#]: reviewer: "wxy"
|
||||||
|
[#]: publisher: "wxy"
|
||||||
|
[#]: url: "https://linux.cn/article-13936-1.html"
|
||||||
|
|
||||||
|
修复在 Ubuntu 上 “Unable to acquire dpkg frontend lock. Are You Root?” 的错误
|
||||||
|
======
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
我假设你对 Linux 很陌生。
|
||||||
|
|
||||||
|
你按照网上的一些教程,告诉你要安装某个程序或运行某个命令。可能是与服务器有关的东西。
|
||||||
|
|
||||||
|
但当你运行这个命令时,你遇到了这个错误:
|
||||||
|
|
||||||
|
```
|
||||||
|
E: Could not open lock file /var/lib/dpkg/lock-frontend – open (13: Permission denied)
|
||||||
|
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
|
||||||
|
```
|
||||||
|
|
||||||
|
或者类似的错误:
|
||||||
|
|
||||||
|
```
|
||||||
|
dpkg: error: required read/write access to the dpkg database directory /var/lib/dpkg
|
||||||
|
E: Sub-process dpkg –set-selections returned an error code (2)
|
||||||
|
E: Executing dpkg failed. Are you root?
|
||||||
|
```
|
||||||
|
|
||||||
|
这两个错误都在问你同一个问题:你是 root 吗?而这就是这个问题的答案。成为 root。
|
||||||
|
|
||||||
|
### 成为 root 以避免这个错误
|
||||||
|
|
||||||
|
你如何 [在 Ubuntu][1] 或 Debian 中成为 root?你使用 `sudo` 命令。
|
||||||
|
|
||||||
|
是的,就是这样。无论你在运行什么命令,只要在它前面加上 `sudo` 即可。
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo your_command
|
||||||
|
```
|
||||||
|
|
||||||
|
![Running command with sudo][2]
|
||||||
|
|
||||||
|
它将要求你输入你的用户账户密码。请记住,当你输入密码时,屏幕上不会显示任何东西,这也没关系。
|
||||||
|
|
||||||
|
你的系统没有任何问题。在大多数 Linux 系统中,输入密码时不会显示通常的星号或其他东西是一种“安全特性”。
|
||||||
|
|
||||||
|
只要输入密码,并在密码后按下回车键即可。如果密码输入正确,你现在应该可以运行该命令了。
|
||||||
|
|
||||||
|
你甚至可以使用这个方便的 [Linux 命令行技巧][3],用 `sudo` 运行以前的命令:
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo !!
|
||||||
|
```
|
||||||
|
|
||||||
|
这很简单,而且立即生效,除非你没有 sudo 权限。然后,你会看到一个不同的错误。
|
||||||
|
|
||||||
|
### 看到一个 “User is not in sudoer file” 的错误?
|
||||||
|
|
||||||
|
![Some users cannot run commands with sudo][4]
|
||||||
|
|
||||||
|
当你 [安装 Ubuntu][5] 时,你必须创建一个用户账户。这个用户被自动授予 `sudo` 权限,在需要时以 root 身份运行命令。
|
||||||
|
|
||||||
|
这发生在 Ubuntu 桌面上,而不是服务器上。大多数服务器发行版会有一个单独的 root 账户。如果你单独创建了一个普通账户,你就必须把这个用户添加到 `sudoer` 中,以便这个普通用户可以使用 `sudo`。
|
||||||
|
|
||||||
|
在上面的截图中,我已经创建了这个额外的用户,但没有将其添加到 sudo 组中。这意味着这里的用户 `prakash` 没有使用 `sudo` 命令的权限,因此系统抱怨 “prakash is not in sudoers file”。
|
||||||
|
|
||||||
|
#### 该事件在哪里报告?
|
||||||
|
|
||||||
|
错误的 `sudo` 尝试会被添加到系统日志中。它记录了用户名、虚拟终端号、运行命令的位置和运行的命令。
|
||||||
|
|
||||||
|
![Incorrect sudo attempts are logged into the system][6]
|
||||||
|
|
||||||
|
这些日志的位置在不同的发行版中有所不同。
|
||||||
|
|
||||||
|
通常,在 Ubuntu 中你可以在 `journalctl` 日志或 `/var/log/auth.log` 文件中找到它,在 Fedora 中可以在 `/var/log/audit/audit.log` 文件中找到它。
|
||||||
|
|
||||||
|
#### 如果一个用户不在 sudoer 列表中,你能做什么?
|
||||||
|
|
||||||
|
当你不能用当前的用户账户使用 `sudo` 时,你能做什么?首先,[验证该用户是否有 sudo 权限。如果没有,你可以有一些选择][7]:
|
||||||
|
|
||||||
|
* 以 root 身份登录或切换 root 身份(如果你有 root 密码)。
|
||||||
|
* [将该用户加入 sudoer 列表][8] (如果你有其他用户账户的管理或 `sudo` 权限)。
|
||||||
|
* 如果你在多用户的 Linux 系统中,自己没有 root 或 `sudo` 权限,请你的系统管理员授予你的用户 sudo 权限或安装你想安装的应用。
|
||||||
|
|
||||||
|
### 这有帮助吗?
|
||||||
|
|
||||||
|
`sudo` 是一个非常全面的安全机制,它不仅仅是允许一个普通用户成为 root。它有助于对系统进行审计,了解哪个用户用 `sudo` 运行了哪个命令。它还可以被配置为只允许某个用户用 `sudo` 运行某些命令。
|
||||||
|
|
||||||
|
你不会在桌面 Linux 上看到如此细化的 `sudo` 配置,在桌面 Linux 上,它被预先配置为允许 `sudo` 组中的任何用户以 `root` 的身份运行任何命令。关于 `sudo` 的更多信息,请参见其他文章。
|
||||||
|
|
||||||
|
我希望在解决这个经典的初学者问题时,你能对 `sudo` 命令有一些初步的了解。如果你对这个主题有进一步的问题,请在评论区告诉我。
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
via: https://itsfoss.com/fixed-are-you-root-error/
|
||||||
|
|
||||||
|
作者:[Abhishek Prakash][a]
|
||||||
|
选题:[lujun9972][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/lujun9972
|
||||||
|
[1]: https://itsfoss.com/root-user-ubuntu/
|
||||||
|
[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/10/running-commands-with-sudo.webp?resize=800%2C450&ssl=1
|
||||||
|
[3]: https://itsfoss.com/linux-command-tricks/
|
||||||
|
[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/10/not-in-sudoer-file-error-800x289.png?resize=800%2C289&ssl=1
|
||||||
|
[5]: https://itsfoss.com/install-ubuntu/
|
||||||
|
[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/10/sudo-incident-reported.png?resize=800%2C339&ssl=1
|
||||||
|
[7]: https://linuxhandbook.com/check-if-user-has-sudo-rights/
|
||||||
|
[8]: https://linuxhandbook.com/create-sudo-user/
|
112
published/20211028 Raspberry Pi Zero 2 W is Here.md
Normal file
112
published/20211028 Raspberry Pi Zero 2 W is Here.md
Normal file
@ -0,0 +1,112 @@
|
|||||||
|
[#]: subject: "Raspberry Pi Zero 2 W is Here!"
|
||||||
|
[#]: via: "https://news.itsfoss.com/raspberry-pi-zero-2-w-launch/"
|
||||||
|
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
|
||||||
|
[#]: collector: "lujun9972"
|
||||||
|
[#]: translator: "wxy"
|
||||||
|
[#]: reviewer: "wxy"
|
||||||
|
[#]: publisher: "wxy"
|
||||||
|
[#]: url: "https://linux.cn/article-13931-1.html"
|
||||||
|
|
||||||
|
树莓派 Zero 2 W 来了!
|
||||||
|
======
|
||||||
|
|
||||||
|
> 树莓派 Zero W 的继任者来了!仅售 15 美元,它包括一些承诺的升级和改进。
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
树莓派 Zero W 是最实惠的包括了无线和蓝牙连接的单板计算机之一。
|
||||||
|
|
||||||
|
虽然 [树莓派 Zero 与树莓派 Zero W][1] 之间有一些区别,但考虑到它们分别以 5 美元和 10 美元的价格推出,两者都是靠谱的选择。
|
||||||
|
|
||||||
|
现在,树莓派在大约 6 年后推出了这个系列的继任者,即树莓派 Zero 2 W,售价为 **$15**。
|
||||||
|
|
||||||
|
即使 [树莓派提高了价格][2],我想说 15 美元买一块改进了多线程性能的新一代电路板应该是个不错的选择。
|
||||||
|
|
||||||
|
让我们来看看它有什么优点和新的东西。
|
||||||
|
|
||||||
|
### 树莓派 Zero 2 W 的规格
|
||||||
|
|
||||||
|
![][3]
|
||||||
|
|
||||||
|
树莓派 Zero 2 W 使用了在树莓派 3 发布版中使用的相同芯片。
|
||||||
|
|
||||||
|
虽然频率略微降低到了 1GHz,它仍然能够保证其性能是原来树莓派 Zero 的 5 倍。
|
||||||
|
|
||||||
|
下面是它的规格:
|
||||||
|
|
||||||
|
* 博通 BCM2710A1,四核 64 位SoC(Arm Cortex-A53 @ 1GHz)
|
||||||
|
* 512MB LPDDR2 SDRAM
|
||||||
|
* 2.4GHz IEEE 802.11b/g/n 无线网络、蓝牙 4.2,BLE
|
||||||
|
* 1×USB 2.0 接口,带 OTG
|
||||||
|
* 与 HAT 兼容的 40 针 I/O 针脚
|
||||||
|
* MicroSD 卡插槽
|
||||||
|
* mini HDMI 接口
|
||||||
|
* 复合的视频和复位引脚焊点
|
||||||
|
* CSI-2 相机连接器
|
||||||
|
* H.264,MPEG-4 解码(1080p30),H.264 编码(1080p30)
|
||||||
|
* OpenGL ES 1.1,2.0 图形
|
||||||
|
|
||||||
|
看看这些规格,考虑到它的外形尺寸,它足够令人印象深刻。不要忘了,他们增加了更多的铜覆层来处理升级后的处理器产生的热量。
|
||||||
|
|
||||||
|
![][4]
|
||||||
|
|
||||||
|
此外,无线电路是用金属屏蔽密封的,这应该使它容易用于商业终端产品。
|
||||||
|
|
||||||
|
![video][5]
|
||||||
|
|
||||||
|
如果你已经有了树莓派 Zero 的外壳,那么它应该很有可能适用于 Zero 2 W。
|
||||||
|
|
||||||
|
根据 [官方公告][6],树莓派提到:
|
||||||
|
|
||||||
|
> 与 Zero 相比,确切的性能提升因工作负载而异,但对于多线程的 [sysbench][7] 来说,它几乎正好是五倍的速度。
|
||||||
|
|
||||||
|
小巧的外形和性能的提升应该使它成为安全摄像机和许多其他物联网项目的理想板卡。你可以了解一下我们的 [树莓派 Zero W 的 DIY 项目][8] 清单,看看有什么灵感。
|
||||||
|
|
||||||
|
### 一个新的 USB 电源
|
||||||
|
|
||||||
|
![][9]
|
||||||
|
|
||||||
|
除了新的电路板,树莓派还推出了一个改进的 USB 电源,峰值电流为 2.5A。
|
||||||
|
|
||||||
|
该电源配备了一个 micro USB 接口,而不是 USB-C。尽管这不是为新的 Zero 2 W 准备的,而是为树莓派 3B 或 3B+ 准备的。
|
||||||
|
|
||||||
|
### 可用性 & 价格
|
||||||
|
|
||||||
|
![][10]
|
||||||
|
|
||||||
|
树莓派基金会已经澄清,他们在 2026 年 1 月之前不会停产树莓派 Zero 和 Zero W。
|
||||||
|
|
||||||
|
因此,如果你想省钱做实验,你可以继续使用旧板。
|
||||||
|
|
||||||
|
新的 Zero 2 W 将在官方经销商处以 15 美元的价格出售。目前供货范围仅限于英国、欧盟、美国、加拿大和香港。
|
||||||
|
|
||||||
|
它应该在 11 月在澳大利亚和新西兰上市,在接下来的几个月里会有更多国家加入。
|
||||||
|
|
||||||
|
- [树莓派 Zero 2 W][11]
|
||||||
|
|
||||||
|
你对最新的微型树莓派 Zero 2 W 有什么看法?欢迎在下面的评论中分享你的想法。
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
via: https://news.itsfoss.com/raspberry-pi-zero-2-w-launch/
|
||||||
|
|
||||||
|
作者:[Ankush Das][a]
|
||||||
|
选题:[lujun9972][b]
|
||||||
|
译者:[wxy](https://github.com/wxy)
|
||||||
|
校对:[wxy](https://github.com/wxy)
|
||||||
|
|
||||||
|
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||||
|
|
||||||
|
[a]: https://news.itsfoss.com/author/ankush/
|
||||||
|
[b]: https://github.com/lujun9972
|
||||||
|
[1]: https://itsfoss.com/raspberry-pi-zero-vs-zero-w/
|
||||||
|
[2]: https://news.itsfoss.com/raspberry-pi-price-hike/
|
||||||
|
[3]: https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2021/10/Raspberry-Pi-Zero-2-W.jpg?w=800&ssl=1
|
||||||
|
[4]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/10/raspberry-pi-zero-2-w-wireless.jpg?w=800&ssl=1
|
||||||
|
[5]: https://youtu.be/V2frBYX62LU
|
||||||
|
[6]: https://www.raspberrypi.com/news/new-raspberry-pi-zero-2-w-2/
|
||||||
|
[7]: https://github.com/akopytov/sysbench
|
||||||
|
[8]: https://itsfoss.com/raspberry-pi-zero-projects/
|
||||||
|
[9]: https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2021/10/rp-power-supply.png?w=800&ssl=1
|
||||||
|
[10]: https://i1.wp.com/news.itsfoss.com/wp-content/uploads/2021/10/Raspberry-Pi-Zero-2-W-Lifestyle.jpg?w=800&ssl=1
|
||||||
|
[11]: https://www.raspberrypi.com/products/raspberry-pi-zero-2-w/
|
@ -0,0 +1,89 @@
|
|||||||
|
[#]: subject: "Microsoft Edge Stable Build is Now Available to Download for Linux"
|
||||||
|
[#]: via: "https://news.itsfoss.com/microsoft-edge-stable-release/"
|
||||||
|
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
|
||||||
|
[#]: collector: "lujun9972"
|
||||||
|
[#]: translator: "wxy"
|
||||||
|
[#]: reviewer: "wxy"
|
||||||
|
[#]: publisher: "wxy"
|
||||||
|
[#]: url: "https://linux.cn/article-13935-1.html"
|
||||||
|
|
||||||
|
现可下载微软 Edge 的 Linux 稳定版了
|
||||||
|
=====
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
> 微软 Edge 的 Linux 最终版本终于亮相了。对于涉足 Linux 的 Windows 用户来说,这似乎是一个值得考虑的选择。
|
||||||
|
|
||||||
|
早在 5 月,[微软就启动了 Linux 版的 Edge 的公开测试][1]。
|
||||||
|
|
||||||
|
现在,就在正式宣布之前,其稳定版已经被推送到官方仓库。
|
||||||
|
|
||||||
|
![][2]
|
||||||
|
|
||||||
|
注意:微软 Edge 不是一个开源的浏览器,但它基于开源的组件。我们报道这个是因为它可以用于 Linux。
|
||||||
|
|
||||||
|
### 微软 Edge 的 Linux 版本:有什么值得喜欢的?
|
||||||
|
|
||||||
|
![][3]
|
||||||
|
|
||||||
|
微软 Edge 基于开源的 Chromium,这一点并不奇怪。所以,是的,它只是又一个 [基于 Chromium 的 Linux 浏览器][4]。
|
||||||
|
|
||||||
|
然而,与谷歌 Chrome 浏览器相比,微软 Edge 提供了良好的用户体验和一些对 Windows 用户来说可能很方便的额外功能。
|
||||||
|
|
||||||
|
根据我在 Windows 10 上的经验,与谷歌 Chrome 浏览器相比,微软 Edge 似乎性能更好,但我还没有为此比较过任何基准。
|
||||||
|
|
||||||
|
那么,它对 Linux 是否有用?有什么理由让你去尝试吗?
|
||||||
|
|
||||||
|
当然,如果你不喜欢使用微软的服务,那就完全是另一回事了。但是,总的来说,微软 Edge 看起来是一个有前途的基于 Chromium 的浏览器,具有一些有用的功能。
|
||||||
|
|
||||||
|
一些可用于 Linux 的关键功能包括:
|
||||||
|
|
||||||
|
* 睡眠标签(以节省资源)
|
||||||
|
* 垂直标签
|
||||||
|
* 收藏
|
||||||
|
* 防止跟踪
|
||||||
|
|
||||||
|
![][5]
|
||||||
|
|
||||||
|
虽然它在配置你的微软账户时也支持家庭安全选项,但并不是每项功能都适用于 Linux。
|
||||||
|
|
||||||
|
此外,我没有发现可以派上用场的 Linux 的“儿童模式”。
|
||||||
|
|
||||||
|
而且,如果你在使用 Linux 的同时还使用其他桌面平台,微软 Edge 可以是跨平台冒险的一个好选择。
|
||||||
|
|
||||||
|
但如果你只想在 Linux 上试用它,你可能想在作出决定之前将它与其他浏览器进行比较。
|
||||||
|
|
||||||
|
### 下载微软 Edge Linux 版
|
||||||
|
|
||||||
|
想知道 [如何在 Linux 上安装微软 Edge 浏览器][6]?尽管 [微软 Edge 的官方网站][7] 没有列出 Linux 版本,但你可以在他们的官方资源库中找到它。
|
||||||
|
|
||||||
|
DEB 和 RPM 两种软件包都是可用的。你可以使用下面的链接下载这些软件包:
|
||||||
|
|
||||||
|
- [微软 Edge (deb)][8]
|
||||||
|
- [微软 Edge (rpm)][9]
|
||||||
|
|
||||||
|
Via: [Sophos][10]
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
via: https://news.itsfoss.com/microsoft-edge-stable-release/
|
||||||
|
|
||||||
|
作者:[Ankush Das][a]
|
||||||
|
选题:[lujun9972][b]
|
||||||
|
译者:[wxy](https://github.com/wxy)
|
||||||
|
校对:[wxy](https://github.com/wxy)
|
||||||
|
|
||||||
|
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||||
|
|
||||||
|
[a]: https://news.itsfoss.com/author/ankush/
|
||||||
|
[b]: https://github.com/lujun9972
|
||||||
|
[1]: https://news.itsfoss.com/microsoft-edge-beta/
|
||||||
|
[2]: https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2021/10/microsoft-edge-download.png?w=829&ssl=1
|
||||||
|
[3]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/10/microsoft-edge-linux.png?w=1097&ssl=1
|
||||||
|
[4]: https://news.itsfoss.com/chrome-like-browsers-2021/
|
||||||
|
[5]: https://i1.wp.com/news.itsfoss.com/wp-content/uploads/2021/10/microsoft-edge-linux-privacy.png?w=1277&ssl=1
|
||||||
|
[6]: https://itsfoss.com/microsoft-edge-linux/
|
||||||
|
[7]: https://www.microsoft.com/en-us/edge
|
||||||
|
[8]: https://packages.microsoft.com/repos/edge/pool/main/m/microsoft-edge-stable/
|
||||||
|
[9]: https://packages.microsoft.com/yumrepos/edge/
|
||||||
|
[10]: https://nakedsecurity.sophos.com/2021/10/29/microsoft-edge-finally-arrives-on-linux-official-build-lands-in-repos/
|
@ -0,0 +1,194 @@
|
|||||||
|
[#]: subject: "Print a Halloween greeting with ASCII art on Linux"
|
||||||
|
[#]: via: "https://opensource.com/article/21/10/ascii-linux-halloween"
|
||||||
|
[#]: author: "Jim Hall https://opensource.com/users/jim-hall"
|
||||||
|
[#]: collector: "lujun9972"
|
||||||
|
[#]: translator: "wxy"
|
||||||
|
[#]: reviewer: "wxy"
|
||||||
|
[#]: publisher: "wxy"
|
||||||
|
[#]: url: "https://linux.cn/article-13939-1.html"
|
||||||
|
|
||||||
|
在 Linux 上用 ASCII 艺术打印万圣节问候语
|
||||||
|
======
|
||||||
|
|
||||||
|
> 使用 Linux 或 FreeDOS 从一个 C 程序中生成彩色的 ASCII 艺术。
|
||||||
|
|
||||||
|
![FreeDOS 上的庆祝万圣节 ASCII 艺术][1]
|
||||||
|
|
||||||
|
利用扩展 ASCII 字符集和它的绘画元素集合的全彩 ASCII 艺术在 DOS 上曾经相当流行。你可以在你的下一个 FreeDOS 程序中加入 ASCII 艺术,作为一个很酷的“欢迎”屏幕,或者作为一个提供了更多程序信息的彩色“退出”屏幕,来增加一点视觉上的乐趣。
|
||||||
|
|
||||||
|
但是,这种 ASCII 艺术的风格并不仅仅局限于 FreeDOS 程序。你可以在 Linux 终端模式的程序中使用同样的方法。虽然 Linux 使用 [ncurses][2] 来控制屏幕,而不是 DOS 的 [conio][3],但相关的概念也适用于 Linux 程序。本文探讨了如何从 C 语言程序中生成彩色 ASCII 艺术。
|
||||||
|
|
||||||
|
### ASCII 艺术文件
|
||||||
|
|
||||||
|
你可以使用各种工具来绘制你的 ASCII 艺术。在这个例子中,我使用了一个叫做 TheDraw 的老式 DOS 应用程序,但是你可以在 Linux 上找到现代的开源 ASCII 艺术程序,比如 [Moebius][4](Apache 许可证)或者 [PabloDraw][5](MIT 许可证)。只要你知道保存的数据是什么样子的,你使用什么工具并不重要。
|
||||||
|
|
||||||
|
下面是一个 ASCII 艺术文件样本的一部分,以 C 源代码保存。请注意,这个代码片段定义了几个值。`IMAGEDATA_WIDTH` 和 `IMAGEDATA_DEPTH` 定义了屏幕上的列数和行数。在这里,它是一个 80x25 的 ASCII 艺术“图像”。`IMAGEDATA_LENGTH` 定义了 `IMAGEDATA` 数组中的条目数量。ASCII 艺术画面中的每个字符可以用两个字节的数据表示。要显示的字符和包含该字符的前景和背景颜色的颜色属性。对于一个 80x25 的屏幕,每个字符都与一个属性配对,该数组包含 4000 个条目(即 `80*25*2=4000`)。
|
||||||
|
|
||||||
|
```
|
||||||
|
#define IMAGEDATA_WIDTH 80
|
||||||
|
#define IMAGEDATA_DEPTH 25
|
||||||
|
#define IMAGEDATA_LENGTH 4000
|
||||||
|
unsigned char IMAGEDATA [] = {
|
||||||
|
'.', 0x08, ' ', 0x08, ' ', 0x08, ' ', 0x08, ' ', 0x08, ' ', 0x08,
|
||||||
|
' ', 0x08, ' ', 0x08, '.', 0x0F, ' ', 0x08, ' ', 0x08, ' ', 0x08,
|
||||||
|
' ', 0x08, ' ', 0x08, ' ', 0x08, ' ', 0x08, ' ', 0x08, '.', 0x0F,
|
||||||
|
' ', 0x08, ' ', 0x08, ' ', 0x08, ' ', 0x08, ' ', 0x08, ' ', 0x08,
|
||||||
|
' ', 0x08, ' ', 0x08, ' ', 0x08, ' ', 0x08, ' ', 0x08, ' ', 0x08,
|
||||||
|
```
|
||||||
|
|
||||||
|
数组的其它部分依此类推。
|
||||||
|
|
||||||
|
为了在屏幕上显示这种 ASCII 艺术,你需要写一个小小的程序来读取数组并以正确的颜色打印每个字符。
|
||||||
|
|
||||||
|
### 设置一个颜色属性
|
||||||
|
|
||||||
|
这个 ASCII 艺术文件中的颜色属性在一个字节中定义了背景和前景的颜色,用十六进制的值表示,如 `0x08` 或 `0x6E`。十六进制是适合表达这样的颜色“对”的紧凑方式。
|
||||||
|
|
||||||
|
像 Linux 上的 ncurses 或 DOS 上的 conio 这样的字符模式系统 [只能显示 16 种颜色][6]。这就是十六种可能的文本颜色和八种背景颜色。用二进制计算十六个值(从 0 到 15)只需要四个二进制位。
|
||||||
|
|
||||||
|
> `1111` 是二进制的 15
|
||||||
|
|
||||||
|
而且方便的是,十六进制可以用一个字符表示 0 到 15:`0`、`1`、`2`、`3`、`4`、`5`、`6`、`7`、`8`、`9`、`A`、`B`、`C`、`D`、`E` 和 `F`。所以十六进制的值 `F` 是数字 15,或二进制的 `1111`。
|
||||||
|
|
||||||
|
通过颜色对,你可以用一个八位的字节来编码背景和前景的颜色。这就是文本颜色的四个二进制位(十六进制中的 0 到 15 或 0 到 F)和背景颜色的三个二进制位(十六进制中的 0 到 7 或 0 到 E)。字节中剩余的二进制位在这里没有使用,所以我们可以忽略它。
|
||||||
|
|
||||||
|
为了将颜色对或属性转换成你的程序可以使用的颜色值,你需要 [使用位掩码][7],只指定用于文字颜色或背景颜色的位。使用 FreeDOS 上的 OpenWatcom C 编译器,你可以编写这个函数,从颜色属性中适当地设置颜色。
|
||||||
|
|
||||||
|
```
|
||||||
|
void
|
||||||
|
textattr(int newattr)
|
||||||
|
{
|
||||||
|
_settextcolor(newattr & 15); /* 0000xxxx */
|
||||||
|
_setbkcolor((newattr >> 4) & 7); /* 0xxx0000 */
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
`_settextcolor` 函数只设置文本颜色,`_setbkcolor` 函数设置背景颜色。两者都定义在 `graph.h` 中。注意,由于颜色属性在一个字节值中包括了背景色和前景色,`textattr` 函数使用 `&`(二进制的“与”运算)来设置一个位掩码,只隔离了属性中的最后四个位。这就是颜色对存储前景颜色的值 0 到 15 的地方。
|
||||||
|
|
||||||
|
为了得到背景色,该函数首先执行了一个位移,将位“推”到右边。这就把“上”位放到了“下”位范围,所以任何像 `0xxx0000` 这样的位都变成了 `00000xxx`。我们可以用另一个的位掩码 7(二进制 `0111`)来挑选出背景颜色值。
|
||||||
|
|
||||||
|
### 显示 ASCII 艺术
|
||||||
|
|
||||||
|
`IMAGEDATA` 数组包含整个 ASCII 艺术屏幕和每个字符的颜色值。为了在屏幕上显示 ASCII 艺术,你的程序需要扫描该数组,设置颜色属性,然后一次在屏幕上显示一个字符。
|
||||||
|
|
||||||
|
让我们在屏幕的底部留出空间,以便向用户提供单独的信息或提示。也就是说,我不想显示一个 80 列 ASCII 屏幕的所有 25 行,而只想显示前 24 行。
|
||||||
|
|
||||||
|
```
|
||||||
|
/* print one line less than the 80x25 that's in there:
|
||||||
|
80 x 24 x 2 = 3840 */
|
||||||
|
|
||||||
|
for (pos = 0; pos < 3840; pos += 2) {
|
||||||
|
...
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
在 `for` 循环里面,我们需要设置颜色,然后打印字符。OpenWatcom C 编译器提供了一个函数 `_outtext` 来显示带有当前颜色值的文本。然而,这需要传递一个字符串,如果我们需要一个一个地处理每个字符,在一行中的每个字符需要不同颜色的情况下,效率就会很低。
|
||||||
|
|
||||||
|
相反,OpenWatcom 有一个类似的函数,叫做 `_outmem`,允许你指示要显示多少个字符。对于一次一个字符,我们可以在 `IMAGEDATA` 数组中提供一个字符值的指针,并告诉 `_outtext` 只显示一个字符。这将使用当前的颜色属性显示该字符,这就是我们需要的。
|
||||||
|
|
||||||
|
```
|
||||||
|
for (pos = 0; pos < 3840; pos += 2) {
|
||||||
|
ch = &IMAGEDATA[pos]; /* pointer assignment */
|
||||||
|
attr = IMAGEDATA[pos + 1];
|
||||||
|
|
||||||
|
textattr(attr);
|
||||||
|
_outmem(ch, 1);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
这个更新的 `for` 循环通过向 `IMAGEDATA` 数组分配一个指针来设置字符 `ch`。接下来, 循环设置文本属性, 然后用 `_outmem` 显示字符.
|
||||||
|
|
||||||
|
### 整合起来
|
||||||
|
|
||||||
|
有了 `textattr` 函数和处理数组的 `for` 循环, 我们可以编写一个完整的程序来显示 ASCII 艺术文件的内容。对于这个例子,将 ASCII 艺术文件保存为 `imgdata.inc`,并用 `#include` 语句将其包含在源文件中。
|
||||||
|
|
||||||
|
```
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <conio.h>
|
||||||
|
#include <graph.h>
|
||||||
|
|
||||||
|
#include "imgdata.inc"
|
||||||
|
|
||||||
|
void
|
||||||
|
textattr(int newattr)
|
||||||
|
{
|
||||||
|
_settextcolor(newattr & 15); /* 0000xxxx */
|
||||||
|
_setbkcolor((newattr >> 4) & 7); /* 0xxx0000 */
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
main()
|
||||||
|
{
|
||||||
|
char *ch;
|
||||||
|
int attr;
|
||||||
|
int pos;
|
||||||
|
|
||||||
|
if (_setvideomode(_TEXTC80) == 0) {
|
||||||
|
fputs("Error setting video mode", stderr);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* draw the array */
|
||||||
|
|
||||||
|
_settextposition(1, 1); /* top left */
|
||||||
|
|
||||||
|
/* print one line less than the 80x25 that's in there:
|
||||||
|
80 x 24 x 2 = 3840 */
|
||||||
|
|
||||||
|
for (pos = 0; pos < 3840; pos += 2) {
|
||||||
|
ch = &IMAGEDATA[pos]; /* pointer assignment */
|
||||||
|
attr = IMAGEDATA[pos + 1];
|
||||||
|
|
||||||
|
textattr(attr);
|
||||||
|
_outmem(ch, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* done */
|
||||||
|
|
||||||
|
_settextposition(25, 1); /* bottom left */
|
||||||
|
|
||||||
|
textattr(0x0f);
|
||||||
|
_outtext("Press any key to quit");
|
||||||
|
|
||||||
|
getch();
|
||||||
|
|
||||||
|
textattr(0x00);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
在 FreeDOS 上使用 OpenWatcom C 编译器编译该程序,你会得到一个显示这个节日信息的新程序。
|
||||||
|
|
||||||
|
![ASCII艺术中的万圣节信息][8]
|
||||||
|
|
||||||
|
*万圣节快乐(Jim Hall, [CC-BY-SA 4.0][9])*
|
||||||
|
|
||||||
|
万圣节快乐,各位!
|
||||||
|
|
||||||
|
- [在此下载 inc 代码文件][10]
|
||||||
|
- [在此下载 C 代码文件][11]
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
via: https://opensource.com/article/21/10/ascii-linux-halloween
|
||||||
|
|
||||||
|
作者:[Jim Hall][a]
|
||||||
|
选题:[lujun9972][b]
|
||||||
|
译者:[wxy](https://github.com/wxy)
|
||||||
|
校对:[wxy](https://github.com/wxy)
|
||||||
|
|
||||||
|
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||||
|
|
||||||
|
[a]: https://opensource.com/users/jim-hall
|
||||||
|
[b]: https://github.com/lujun9972
|
||||||
|
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/freedos-halloween-4x3.jpg?itok=6e_42rs9 (Happy Halloween ASCII art on FreeDOS)
|
||||||
|
[2]: https://opensource.com/article/21/8/ncurses-linux
|
||||||
|
[3]: https://opensource.com/article/21/9/programming-dos-conio
|
||||||
|
[4]: https://blocktronics.github.io/moebius/
|
||||||
|
[5]: https://github.com/blocktronics/pablodraw
|
||||||
|
[6]: https://opensource.com/article/21/6/freedos-sixteen-colors
|
||||||
|
[7]: https://opensource.com/article/21/8/binary-bit-fields-masks
|
||||||
|
[8]: https://opensource.com/sites/default/files/freedos-halloween-4x3.png
|
||||||
|
[9]: https://creativecommons.org/licenses/by-sa/4.0/
|
||||||
|
[10]: https://opensource.com/sites/default/files/uploads/imgdata.inc_.txt
|
||||||
|
[11]: https://opensource.com/sites/default/files/uploads/hallown.c.txt
|
@ -0,0 +1,97 @@
|
|||||||
|
[#]: subject: "This Game Developer Loves the Linux Community for an Unusual Reason"
|
||||||
|
[#]: via: "https://news.itsfoss.com/game-dev-loves-linux/"
|
||||||
|
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
|
||||||
|
[#]: collector: "lujun9972"
|
||||||
|
[#]: translator: " "
|
||||||
|
[#]: reviewer: " "
|
||||||
|
[#]: publisher: " "
|
||||||
|
[#]: url: " "
|
||||||
|
|
||||||
|
This Game Developer Loves the Linux Community for an Unusual Reason
|
||||||
|
======
|
||||||
|
|
||||||
|
The Linux community, in general, is one of the most active and helpful communities out there.
|
||||||
|
|
||||||
|
And, a significant chunk of that can also be toxic or aggressive to newbies or someone who tries to break traditions.
|
||||||
|
|
||||||
|
However, a game developer seems to be appreciating the Linux community for complaining too much…
|
||||||
|
|
||||||
|
Yes, you heard that right! But, that’s not the entire picture. Let me tell you more about it.
|
||||||
|
|
||||||
|
### Reporting Bugs is Essential for Game Improvement
|
||||||
|
|
||||||
|
Whether it is an indie game or a full-fledged AAA title, every game arrives with several bugs.
|
||||||
|
|
||||||
|
For some studios, game testers try to spot the bugs before launch. But, no matter the effort, players will always notice something that the developers may not have.
|
||||||
|
|
||||||
|
So, it is important for developers to work on the reported bugs for a better gaming experience.
|
||||||
|
|
||||||
|
But, what if you do not get any bug reports even if the game encounters issues?
|
||||||
|
|
||||||
|
Of course, you can invest a lot of time to find out the potential issues faced by players. Unfortunately, it is not possible to iron out everything yourself.
|
||||||
|
|
||||||
|
This is why bug reports from players are an essential part of game development.
|
||||||
|
|
||||||
|
And, to emphasize the importance of bug reports, the game developer of “**[ΔV: Rings of Saturn][1]**” shared some interesting information.
|
||||||
|
|
||||||
|
### Linux Gamers Reported Over 38% Bug Reports With 5.8% Userbase
|
||||||
|
|
||||||
|
![][2]
|
||||||
|
|
||||||
|
Even though [gaming on Linux][3] is improving with the [addition of Easy Anti-Cheat, BattleEye][4], and many other new advancements, the user base is tiny when compared to Windows.
|
||||||
|
|
||||||
|
However, the developer of “**ΔV: Rings of Saturn**” shares an insight where he mentions that out of all the players, Linux gamers reported a significant section of bugs considering the user base.
|
||||||
|
|
||||||
|
![][5]
|
||||||
|
|
||||||
|
Here’s what he said in a [Reddit thread][6]:
|
||||||
|
|
||||||
|
> Percentages are easy to talk about, but when I read just them, I always wonder – what is the sample size? Is it small enough for the percentage to be just noise?
|
||||||
|
>
|
||||||
|
> As of today, I sold a little over 12,000 units of ΔV in total. 700 of these units were bought by Linux players.
|
||||||
|
>
|
||||||
|
> That’s 5.8%. I got 1040 bug reports in total, out of which roughly 400 are made by Linux players. That’s one report per 11.5 users on average, and one report per 1.75 Linux players. That’s right, an average Linux player will get you 650% more bug reports.
|
||||||
|
|
||||||
|
Not just limited to the number of bug reports, most of the issues reported were well-detailed and could be reproduced or isolated with the details provided.
|
||||||
|
|
||||||
|
So, the minority group of Linux gamers turns out to be more valuable in terms of giving feedback and helping improve the game compared to Windows users.
|
||||||
|
|
||||||
|
Also, the issues spotted were hardly platform-specific. So, these reports will equally help gamers using Windows to play the game as well.
|
||||||
|
|
||||||
|
The game developer adds:
|
||||||
|
|
||||||
|
> It’s worth it to get the massive feedback boost and free, hundred-people strong QA team on your side. An invaluable asset for an independent game studio.
|
||||||
|
|
||||||
|
Of course, no gamer is obliged to report errors in a game. But, this example highlighted by the game developer goes to show how passionate the Linux community can be along with the importance of bug reports.
|
||||||
|
|
||||||
|
### Closing Thoughts
|
||||||
|
|
||||||
|
Overall, I believe that you can always count on the Linux community. While some can be toxic, the majority of the users work towards helping each other and growing together as Linux users.
|
||||||
|
|
||||||
|
What do you think about this particular insight of Linux users reporting more bug reports despite the number of users? Please don’t hesitate to share your thoughts in the comments down below.
|
||||||
|
|
||||||
|
#### Big Tech Websites Get Millions in Revenue, It's FOSS Got You!
|
||||||
|
|
||||||
|
If you like what we do here at It's FOSS, please consider making a donation to support our independent publication. Your support will help us keep publishing content focusing on desktop Linux and open source software.
|
||||||
|
|
||||||
|
I'm not interested
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
via: https://news.itsfoss.com/game-dev-loves-linux/
|
||||||
|
|
||||||
|
作者:[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://news.itsfoss.com/author/ankush/
|
||||||
|
[b]: https://github.com/lujun9972
|
||||||
|
[1]: https://store.steampowered.com/app/846030/V_Rings_of_Saturn/
|
||||||
|
[2]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQzOSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4=
|
||||||
|
[3]: https://itsfoss.com/linux-gaming-guide/
|
||||||
|
[4]: https://news.itsfoss.com/easy-anti-cheat-linux/
|
||||||
|
[5]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjUzNiIgd2lkdGg9Ijc2MyIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4=
|
||||||
|
[6]: https://www.reddit.com/r/gamedev/comments/qeqn3b/despite_having_just_58_sales_over_38_of_bug/
|
@ -0,0 +1,112 @@
|
|||||||
|
[#]: subject: "Global communication in open source projects"
|
||||||
|
[#]: via: "https://opensource.com/article/21/10/global-communication-open-source"
|
||||||
|
[#]: author: "Rachel Naegele https://opensource.com/users/ranaegele"
|
||||||
|
[#]: collector: "lujun9972"
|
||||||
|
[#]: translator: " "
|
||||||
|
[#]: reviewer: " "
|
||||||
|
[#]: publisher: " "
|
||||||
|
[#]: url: " "
|
||||||
|
|
||||||
|
Global communication in open source projects
|
||||||
|
======
|
||||||
|
An interview with FreeDOS Project founder Jim Hall on communicating
|
||||||
|
effectively around the world.
|
||||||
|
![Globe up in the clouds][1]
|
||||||
|
|
||||||
|
I am a current graduate student at the University of Minnesota, Twin Cities in the Scientific and Technical Communication MS program. The following is an interview I conducted with [Jim Hall][2] to learn about international professional communication strategies in the multinational group, the FreeDOS Project.
|
||||||
|
|
||||||
|
**You started the [FreeDOS project][3] in 1994. How did you communicate with the global network of developers for this project at the beginning? How have your communication strategies for international communication changed over the years?**
|
||||||
|
|
||||||
|
We've gone through a few different ways to communicate with each other.
|
||||||
|
|
||||||
|
In the early 1990s, USENET was a common way to communicate with a group of people. USENET was very similar to a message forum, but it was globally distributed. Topics were arranged in groups. You could post a message in a USENET group, and someone else would see it and possibly reply to it.
|
||||||
|
|
||||||
|
I posted the [first announcement][4] about FreeDOS on the comp.os.msdos.apps group. As we got started on FreeDOS, we used that group to discuss our development work. There are a few benefits of using a group like that:
|
||||||
|
|
||||||
|
* It was global, so everyone could participate.
|
||||||
|
* It was asynchronous, so it didn't matter what timezone you lived in.
|
||||||
|
* It was open, so everyone could see the conversation.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Around 1996, we moved from USENET to an email list. Email lists were very common at the time, and they remain popular for some uses, such as ours. With an email list, whenever someone sends a message to the list, everyone gets a copy. The downside is that very active email lists can fill up your inbox. But the FreeDOS email lists aren't as active these days as they once were, so our email lists don't tend to have a high bandwidth.
|
||||||
|
|
||||||
|
Over the years, folks have experimented with other ways to communicate. Robert Riebisch at BTTR Software set up a general web-based discussion board called ["DOS Ain't Dead"][5] to discuss DOS projects in 1997, and it's still a popular forum for general DOS topics. You can also find FreeDOS topics discussed there. That's not our official discussion board, however; the official place for all FreeDOS development discussions is the [freedos-devel email list][6].
|
||||||
|
|
||||||
|
We use freedos-devel to discuss upcoming changes to the FreeDOS distribution, announce new versions of programs, ask for programming help, and generally talk about DOS development.
|
||||||
|
|
||||||
|
**What communication issues have you run into while working with a global team? How did you resolve these issues?**
|
||||||
|
|
||||||
|
With developers all around the world, in so many languages, from so many cultures, we have had our share of communication issues.
|
||||||
|
|
||||||
|
Our de facto language on the email list is English. We never set that as a rule, but almost everyone communicates in English anyway. Sometimes a new subscriber to the email list sends a message in another language, but usually someone who speaks that language can reply to them.
|
||||||
|
|
||||||
|
Inevitably, we do have miscommunication issues, usually because of cultural or language problems. For example, someone who doesn't speak English fluently might say something in an awkward way, and someone else might respond negatively to that. But these instances are pretty rare, I think. And we have strong [email list rules][7] that say (among other things) that you need to be nice to each other. And folks police each other pretty well; if there's an issue, it's usually short-lived.
|
||||||
|
|
||||||
|
Other issues include culture clash. In international communication, there's a concept of [high-context and low-context][8] communicators. Germany is a typical example of a low-context culture: They get right to the point with very little small talk. Other cultures might see the German style as speaking bluntly, but to a German, that's just a natural way to communicate. On the other hand, Korea or Japan is a typical example of a high-context culture; it would be very unusual for a high-context communicator to talk about a problem in a very direct way.
|
||||||
|
|
||||||
|
In the United States, we're more low context than high context, at about the one-quarter mark.
|
||||||
|
|
||||||
|
One example of this culture clash is when a user from a high-context country emailed the list to report a bug. I suppose this person viewed a program bug as an embarrassment for the developer, so the person didn't address the bug directly. They didn't provide a specific description of the bug. The other developers on the email list didn't respond well to that. I recall replies along the lines of "What's the problem here?" or "What are you talking about?" All because we communicate differently depending on our background.
|
||||||
|
|
||||||
|
**What have been the biggest challenges in creating a DOS for an international audience?**
|
||||||
|
|
||||||
|
I'm really glad that we have some very active people in FreeDOS who are working on translating messages in all these programs. There are a few folks who contribute to FreeDOS by translating messages from one language to another and sharing those message files so we can use them in the FreeDOS distribution.
|
||||||
|
|
||||||
|
FreeDOS is a small operating system with low memory constraints, so actually our biggest challenge has been technical.
|
||||||
|
|
||||||
|
In a more modern system like Linux, you can provide message translation through a service like [catgets][9] or [gettext][10]. Both are programming libraries where the program says, "I need this string [text] in the user's preferred language," and the library gives the program that string. This is an example of internationalization, by providing translations in different languages.
|
||||||
|
|
||||||
|
But writing a library like that can take a lot of memory, and a 16-bit operating system like DOS doesn't have a lot of memory to spare. So most early FreeDOS programs didn't bother dealing with it. If the programmer spoke English, they probably wrote their program to use English messages and to accept English input (such as "y" for "yes," and so on).
|
||||||
|
|
||||||
|
Unfortunately, that meant someone in Spain or France or Portugal who didn't understand English would have a hard time using FreeDOS. So, I wrote a simplified version of catgets for FreeDOS called Cats. It provided the same catgets function feature set, which meant if you were porting or translating a program from Linux to run on FreeDOS, the catgets function would do the same thing. The programmer wouldn't need to change anything in the source code for the program to work on FreeDOS; they just used FreeDOS Cats.
|
||||||
|
|
||||||
|
Catgets looks up a message or string using a _message catalog_ (a file that contains a list of messages in a specific language) and a pair of numbers called the _message set_ and the _message number._ The name catgets comes from the catalog to get a string in the user's preferred language. For example, a message to say "Hello" to the user might be stored in message set 1, as message number 2 in that message set. So you'd have this line in an English catalog file:
|
||||||
|
|
||||||
|
`1.2:Hello`
|
||||||
|
|
||||||
|
And you'd have other language catalog files that had the same messages translated to other languages. A Spanish catalog might have this line to represent the same message:
|
||||||
|
|
||||||
|
`1.2:Hola`
|
||||||
|
|
||||||
|
Tom Ehlert modified Cats to be even smaller but also much simpler. This version was named Kitten. Cats and Kitten solved the problem pretty well. A translator could create a message catalog by editing a plain text file, and someone else could use that right away. A lot of FreeDOS programs adopted Cats or Kitten to provide message internationalization. That solved a huge problem for us!
|
||||||
|
|
||||||
|
Kitten is not the only solution. Different developers might solve the language problem in different ways. But Kitten is probably the most popular way to do it.
|
||||||
|
|
||||||
|
**What are some of the main factors that you consider when communicating interculturally?**
|
||||||
|
|
||||||
|
For me, I need to be aware of who I'm talking to when I send a message. If I'm emailing a specific person, I'll use the email they sent me as a guide to guess whether they prefer a high-context or low-context answer. If I don't know, I'll probably default to a lower context mode. That means I'll get to the point quickly, but it's okay to set up some context.
|
||||||
|
|
||||||
|
If I'm writing for a more general audience (such as sending emails to our email list, posting an announcement to our website, or whatever), I'll also adopt the lower context communication mode. That's more important on a website, where many readers will probably click off the site if it's too wordy.
|
||||||
|
|
||||||
|
**Using your time working on the FreeDOS project as a reference, what advice would you give to someone looking to increase their intercultural communication competence?**
|
||||||
|
|
||||||
|
Ever since I learned about high-context vs. low-context communication styles, I've used that as a guide. For anyone who wants to increase their intercultural communication competence, I recommend learning the high- vs. low-context spectrum. Build your own understanding of where different cultures are placed on this spectrum: Italy tends to be around the middle, the UK tends to be around the one-third mark, and so on.
|
||||||
|
|
||||||
|
Beyond that, I would recommend always assuming positive intent. If someone reached out to you in an email, read past any preconceptions about how that person communicated and find the message they wanted to convey. A high-context communicator will rarely hit an issue head-on, so you may need to read more carefully. A low-context communicator will probably seem very blunt, but they are just trying to get to the point quickly.
|
||||||
|
|
||||||
|
Don't assume based on your own context.
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
via: https://opensource.com/article/21/10/global-communication-open-source
|
||||||
|
|
||||||
|
作者:[Rachel Naegele][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/ranaegele
|
||||||
|
[b]: https://github.com/lujun9972
|
||||||
|
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/cloud-globe.png?itok=_drXt4Tn (Globe up in the clouds)
|
||||||
|
[2]: https://opensource.com/users/jim-hall
|
||||||
|
[3]: https://www.freedos.org/
|
||||||
|
[4]: https://groups.google.com/g/comp.os.msdos.apps/c/oQmT4ETcSzU/m/O1HR8PE2u-EJ
|
||||||
|
[5]: https://www.bttr-software.de/forum/board.php
|
||||||
|
[6]: http://lists.sourceforge.net/lists/listinfo/freedos-user
|
||||||
|
[7]: http://freedos.sourceforge.net/freedos/lists/remind.txt
|
||||||
|
[8]: https://en.wikipedia.org/wiki/High-context_and_low-context_cultures
|
||||||
|
[9]: https://www.ibm.com/docs/en/i/7.3?topic=functions-catgets-retrieve-message-from-message-catalog
|
||||||
|
[10]: https://www.gnu.org/software/gettext/manual/gettext.html
|
@ -2,7 +2,7 @@
|
|||||||
[#]: via: "https://itsfoss.com/change-terminal-color-ubuntu/"
|
[#]: via: "https://itsfoss.com/change-terminal-color-ubuntu/"
|
||||||
[#]: author: "Ankush Das https://itsfoss.com/author/ankush/"
|
[#]: author: "Ankush Das https://itsfoss.com/author/ankush/"
|
||||||
[#]: collector: "lujun9972"
|
[#]: collector: "lujun9972"
|
||||||
[#]: translator: " "
|
[#]: translator: "robsean"
|
||||||
[#]: reviewer: " "
|
[#]: reviewer: " "
|
||||||
[#]: publisher: " "
|
[#]: publisher: " "
|
||||||
[#]: url: " "
|
[#]: url: " "
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
[#]: via: "https://itsfoss.com/set-java-home-ubuntu/"
|
[#]: via: "https://itsfoss.com/set-java-home-ubuntu/"
|
||||||
[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/"
|
[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/"
|
||||||
[#]: collector: "lujun9972"
|
[#]: collector: "lujun9972"
|
||||||
[#]: translator: " "
|
[#]: translator: "robsean"
|
||||||
[#]: reviewer: " "
|
[#]: reviewer: " "
|
||||||
[#]: publisher: " "
|
[#]: publisher: " "
|
||||||
[#]: url: " "
|
[#]: url: " "
|
||||||
|
@ -1,95 +0,0 @@
|
|||||||
[#]: subject: "Annotator: Open-Source App for Linux to Easily Add Essential Annotations to Your Images"
|
|
||||||
[#]: via: "https://itsfoss.com/annotator/"
|
|
||||||
[#]: author: "Ankush Das https://itsfoss.com/author/ankush/"
|
|
||||||
[#]: collector: "lujun9972"
|
|
||||||
[#]: translator: " "
|
|
||||||
[#]: reviewer: " "
|
|
||||||
[#]: publisher: " "
|
|
||||||
[#]: url: " "
|
|
||||||
|
|
||||||
Annotator: Open-Source App for Linux to Easily Add Essential Annotations to Your Images
|
|
||||||
======
|
|
||||||
|
|
||||||
_**Brief:**_ _An exciting and useful annotation tool with additional features for Linux systems._
|
|
||||||
|
|
||||||
When it comes to image manipulation and editing, there are many tools available. However, options like GIMP are not necessarily the solution to everything.
|
|
||||||
|
|
||||||
Yes, GIMP offers plenty of features for beginners and advanced users, but it could be time-consuming to learn something and apply visual enhancements to any image you want.
|
|
||||||
|
|
||||||
Annotator is an impressive open-source tool that lets you do a lot of things in a couple of clicks.
|
|
||||||
|
|
||||||
### Annotator: Open-Source Image Annotation Tool
|
|
||||||
|
|
||||||
![][1]
|
|
||||||
|
|
||||||
Annotator lets you quickly add shapes, texts, and other visual elements. This is useful for a variety of use-cases.
|
|
||||||
|
|
||||||
The tool is easy to use and offers a simple user interface. And, you also get a variety of features to enhance the images you want.
|
|
||||||
|
|
||||||
### Features of Annotator
|
|
||||||
|
|
||||||
![Adding icons to images][2]
|
|
||||||
|
|
||||||
Not just limited to adding enhancements to an image, but you also get some other functionalities with Annotator. Some of the key features are:
|
|
||||||
|
|
||||||
* Ability to add a text
|
|
||||||
* Customize the text color, adjust the size, tweak the highlight color, and more
|
|
||||||
* Use magnifying tool to focus on a particular point in image
|
|
||||||
* Tweak the magnifier to change the angle, and size
|
|
||||||
* Add visual icons to express something
|
|
||||||
* Use pencil to write, useful for trackpad users
|
|
||||||
* Blur tool to obfuscate important or unnecessary details
|
|
||||||
* Counter icons to highlight important any sort of order in an image
|
|
||||||
* Supports multiple fonts
|
|
||||||
* Adjust the border width and lines for shapes and texts
|
|
||||||
* Various shapes like arrow, circle, and star available
|
|
||||||
* Ability to resize and crop images
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
![][3]
|
|
||||||
|
|
||||||
### Installing Annotator in Linux
|
|
||||||
|
|
||||||
Primarily, Annotator is available on AppCenter for elementaryOS. But, fortunately, it is a Flatpak package, so that you can install it on any Linux distribution.
|
|
||||||
|
|
||||||
All you need to do is head to the AppCenter store’s link and then download/open the **Flatpak ref** file using the software installer. We have more information on this in our [Flatpak guide][4], if you need help.
|
|
||||||
|
|
||||||
[Annotator][5]
|
|
||||||
|
|
||||||
To build from the source or explore more about it, you can check out its [GitHub page][6].
|
|
||||||
|
|
||||||
### Thoughts on Using Annotator
|
|
||||||
|
|
||||||
I find it useful for my work, considering we need to deal with various screenshots every day. And, the more descriptive, the better the images for our readers to understand.
|
|
||||||
|
|
||||||
Usually, I use Flameshot as my screenshot tool and add annotations available through it. There are other [screenshot tools available for Linux][7], but I prefer Flameshot for its quick annotation features.
|
|
||||||
|
|
||||||
However, you cannot use Flameshot or any other screenshot tool to add annotations to existing images.
|
|
||||||
|
|
||||||
Hence, Annotator came in handy to edit existing screenshots or any other images needed.
|
|
||||||
|
|
||||||
All of its features worked well in my brief usage, but I’d want to edit and re-size the text to be more intuitive. Other than that, I have no complaints.
|
|
||||||
|
|
||||||
I’d recommend you give this a try if you need to add highlights/annotations to the images on your system. Let me know your thoughts in the comments down below.
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
via: https://itsfoss.com/annotator/
|
|
||||||
|
|
||||||
作者:[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://i2.wp.com/itsfoss.com/wp-content/uploads/2021/10/annotator.png?resize=800%2C573&ssl=1
|
|
||||||
[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/10/annotator-screenshot.png?resize=800%2C410&ssl=1
|
|
||||||
[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/10/annotator-resize.png?resize=800%2C490&ssl=1
|
|
||||||
[4]: https://itsfoss.com/flatpak-guide/
|
|
||||||
[5]: https://appcenter.elementary.io/com.github.phase1geo.annotator/
|
|
||||||
[6]: https://github.com/phase1geo/Annotator
|
|
||||||
[7]: https://itsfoss.com/take-screenshot-linux/
|
|
@ -1,136 +0,0 @@
|
|||||||
[#]: subject: "Linux Tablets: What are Your Options?"
|
|
||||||
[#]: via: "https://itsfoss.com/linux-tablets/"
|
|
||||||
[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/"
|
|
||||||
[#]: collector: "lujun9972"
|
|
||||||
[#]: translator: " "
|
|
||||||
[#]: reviewer: " "
|
|
||||||
[#]: publisher: " "
|
|
||||||
[#]: url: " "
|
|
||||||
|
|
||||||
Linux Tablets: What are Your Options?
|
|
||||||
======
|
|
||||||
|
|
||||||
There are plenty of [Linux-based laptops available][1]. There are also [mini-PCs preloaded with Linux][2].
|
|
||||||
|
|
||||||
A few [Linux-based smartphones][3] are also present in the market.
|
|
||||||
|
|
||||||
How about tablets? Are there some good Linux-based tablets? The answer is not straightforward.
|
|
||||||
|
|
||||||
Many Linux-only system manufacturers focus on creating desktop computers. This is primarily due to the fact that the Linux experience on touch devices is no where close to what Android and iOS provide.
|
|
||||||
|
|
||||||
Does this mean you cannot use Linux on a tablet? Not really. There are a few options available for the early adapters and DIY tinkerers. Let’s see what options do you have in the name of Linux tablets.
|
|
||||||
|
|
||||||
### Ubuntu Touch
|
|
||||||
|
|
||||||
![Ubuntu Touch OS on BQ tablets][4]
|
|
||||||
|
|
||||||
Alright! This is not a gadget but an operating system. But this does give you option to install a touch-friendly version of Ubuntu on some old Android tablet.
|
|
||||||
|
|
||||||
Mind the word ‘some’. Officially, Ubuntu Touch [supports][5] on Nexus 7, Lenovo M10, Xperia Z4 and BQ Aquaris tablets. You may even try to install Ubuntu Touch on some other tablet of yours. It may not work 100% but could still be pretty much useable.
|
|
||||||
|
|
||||||
Ubuntu Touch was a project by Ubuntu team but they [discontinued it in 2017][6]. [UBports][7] has taken the responsibility of continuing this project and they are doing a good job at it with their limited resources.
|
|
||||||
|
|
||||||
All in all, if you have an experimental temperament and want to give another life to your old Android tablet, Ubuntu Touch could be your weekend project.
|
|
||||||
|
|
||||||
[Ubuntu Touch][8]
|
|
||||||
|
|
||||||
### Pine Tab
|
|
||||||
|
|
||||||
![PineTab][9]
|
|
||||||
|
|
||||||
Pine64 started with its single board computer Pine A64 as a [Raspberry Pi alternative][10]. It launched several Pine-branded products over the time. This list includes low cast [PineTime smartwatch][11], Pinebook laptop, PinePhone smartphone and PineTab tablet.
|
|
||||||
|
|
||||||
These Pine devices are often inexpensive and allow the user full control on the gadget. This tinkering attitude has helped it gathered a huge fan following of open source DIY enthusiasts.
|
|
||||||
|
|
||||||
The PineTab basically uses the same component as the Pine64 single board computers with touchscreen and keyboard. It’s not the prettiest looking gadget out there but then, it does not intend to be one.
|
|
||||||
|
|
||||||
The specifications are basic with an HD IPS capacitive touchscreen, Allwinner A64 chipset, Quad-core CPU and 2 GB RAM.
|
|
||||||
|
|
||||||
It’s not something that can compete with an iPad or Galaxy Tab but it allows you to install a distribution of your choice and configure it as you want.
|
|
||||||
|
|
||||||
Please keep in mind that Pine has limited stock, so consider yourself lucky if you can see this device available for purchase.
|
|
||||||
|
|
||||||
[PineTab][12]
|
|
||||||
|
|
||||||
### PineNote
|
|
||||||
|
|
||||||
![PineNote][13]
|
|
||||||
|
|
||||||
Another Pine device that is slightly different from the PineTab you saw in the previous section.
|
|
||||||
|
|
||||||
The PineTab is a Linux tablet for browsing internet, using applications and playing games. The PineNote is for taking notes and reading books and documents.
|
|
||||||
|
|
||||||
It has a Eink display that you may have seen on e-book readers like Kindle. Apart from letting you experience an e-book reader, PineNote also allows you to take note with a Wacom Pen.
|
|
||||||
|
|
||||||
PineNote has Quad-core Rockchip, multi-touch Eink panel, 4 GB RAm and 128 GB eMMC storage. It is also one of the rare few gadgets that has a higher than usual price tag of $399.
|
|
||||||
|
|
||||||
Please keep in mind that PineNote is in early developments and is accepting orders only from developers.
|
|
||||||
|
|
||||||
[PineNote][14]
|
|
||||||
|
|
||||||
### JingPad
|
|
||||||
|
|
||||||
![JingPad on my desk][15]
|
|
||||||
|
|
||||||
Perhaps one of the rare few projects that aim to provide a ‘consumer level Linux tablet’. They have premium, custom hardware on the high end side. It has 11″ 2K AMOLED displaym 8 GB RAM, Unisoc Tiger T7510 Octa Core processor along with magnetic keyboard.
|
|
||||||
|
|
||||||
Altogether, things look quite good on the paper, at least from the hardware perspective. Premium hardware comes at premium pricing, of course. The device could cost between $600-$800.
|
|
||||||
|
|
||||||
JingPad also has its own Linux based, touch-friendly operating system called JingOS. The operating system is still under heavy development and should be ready by end of first quarter of 2022.
|
|
||||||
|
|
||||||
Want to know more about JingPad? Read [my experience with JingPad and JingOS in this detailed review][16].
|
|
||||||
|
|
||||||
[JingPad][17]
|
|
||||||
|
|
||||||
### RasPad
|
|
||||||
|
|
||||||
![RasPad][18]
|
|
||||||
|
|
||||||
RasPad is a kit for Raspberry Pi devices to turn it into a functional touch based device. Unlike the regular tabs, this is not a flat device but has a wedge shaped body. This makes it easier to use at desks.
|
|
||||||
|
|
||||||
RasPad is created specially for Raspberry Pi devices and you can use most of its ports easily. There is a dedicated RasPad OS but you are free to use the regular Raspbian OS or Ubuntu or any other Raspberry Pi operating system. Do consider touch friendliness while choosing the OS.
|
|
||||||
|
|
||||||
Please keep in mind that Raspberry Pi device is NOT included in the kit. You’ll have to buy it separately.
|
|
||||||
|
|
||||||
[RasPad][19]
|
|
||||||
|
|
||||||
### What’s your choice?
|
|
||||||
|
|
||||||
I know we are still far from a good alternative Linux tablet that could compete with at least the Android tablets in the market. But at least we have some options available and that’s a silver lining.
|
|
||||||
|
|
||||||
Do you already own any of the above listed devices? How is your experience with it?
|
|
||||||
|
|
||||||
If you had to choose only one of them, which is your choice for the ideal Linux tablet?
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
via: https://itsfoss.com/linux-tablets/
|
|
||||||
|
|
||||||
作者:[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/get-linux-laptops/
|
|
||||||
[2]: https://itsfoss.com/linux-based-mini-pc/
|
|
||||||
[3]: https://itsfoss.com/linux-phones/
|
|
||||||
[4]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/10/ubuntu-touch.jpg?resize=755%2C537&ssl=1
|
|
||||||
[5]: https://devices.ubuntu-touch.io/
|
|
||||||
[6]: https://itsfoss.com/ubuntu-unity-shutdown/
|
|
||||||
[7]: https://ubports.com/
|
|
||||||
[8]: https://ubuntu-touch.io/
|
|
||||||
[9]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/10/PineTab.jpg?resize=800%2C742&ssl=1
|
|
||||||
[10]: https://itsfoss.com/raspberry-pi-alternatives/
|
|
||||||
[11]: https://itsfoss.com/pinetime-linux-smartwatch/
|
|
||||||
[12]: https://pine64.com/product/pinetab-10-1-linux-tablet-with-detached-backlit-keyboard/?v=0446c16e2e66
|
|
||||||
[13]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/10/PineNote-tab.jpg?resize=800%2C615&ssl=1
|
|
||||||
[14]: https://www.pine64.org/pinenote/
|
|
||||||
[15]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/09/jingpad-keyboard-angle.webp?resize=800%2C600&ssl=1
|
|
||||||
[16]: https://itsfoss.com/jingpad-a1-review/
|
|
||||||
[17]: https://en.jingos.com/jingpad-a1/
|
|
||||||
[18]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/10/raspad.webp?resize=800%2C614&ssl=1
|
|
||||||
[19]: https://raspad.com/products/raspadv3
|
|
@ -2,7 +2,7 @@
|
|||||||
[#]: via: "https://itsfoss.com/build-essential-ubuntu/"
|
[#]: via: "https://itsfoss.com/build-essential-ubuntu/"
|
||||||
[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/"
|
[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/"
|
||||||
[#]: collector: "lujun9972"
|
[#]: collector: "lujun9972"
|
||||||
[#]: translator: " "
|
[#]: translator: "geekpi"
|
||||||
[#]: reviewer: " "
|
[#]: reviewer: " "
|
||||||
[#]: publisher: " "
|
[#]: publisher: " "
|
||||||
[#]: url: " "
|
[#]: url: " "
|
||||||
|
@ -1,97 +0,0 @@
|
|||||||
[#]: subject: "Why Mark Text is my favorite markdown editor"
|
|
||||||
[#]: via: "https://opensource.com/article/21/10/mark-text-markdown-editor"
|
|
||||||
[#]: author: "Don Watkins https://opensource.com/users/don-watkins"
|
|
||||||
[#]: collector: "lujun9972"
|
|
||||||
[#]: translator: " "
|
|
||||||
[#]: reviewer: " "
|
|
||||||
[#]: publisher: " "
|
|
||||||
[#]: url: " "
|
|
||||||
|
|
||||||
Why Mark Text is my favorite markdown editor
|
|
||||||
======
|
|
||||||
Mark Text has tools that make it easy to write markdown while at the
|
|
||||||
same time providing a simple interface that just gets out of my way.
|
|
||||||
![Typewriter keys in multicolor][1]
|
|
||||||
|
|
||||||
I got introduced to the markdown format a few years ago when I began to explore Jupyter Notebooks. Many of the other writers at Opensource.com knew markdown, but it was a skill that was unfamiliar to me.
|
|
||||||
|
|
||||||
Markdown is a standard way of writing text, in which you use minimal notation to _markup_ how you want the text styled. For instance, instead of clicking a button to make a word bold, you surround the word with two asterisks (**word**). This has two effects:
|
|
||||||
|
|
||||||
* Visually suggests emboldened text when viewed as plain text
|
|
||||||
* Appears as bold, given a good text converter or renderer (such as Pandoc or a good markdown text editor)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
One of the greatest advantages of markdown is that most of its notation is intuitive and derived from habits most of us already have. It just makes sense to emphasize words with asterisks, mark headlines with characters to set them apart, and so on.
|
|
||||||
|
|
||||||
Everyone spoke highly of it, but I wasn't sure why I would need to learn and use markdown. However, I'm a curious person, and I began to explore markdown and how it might figure into my writing.
|
|
||||||
|
|
||||||
### Learning markdown
|
|
||||||
|
|
||||||
I enjoyed using a markdown [cheat sheet][2] as I learned. I found markdown to be an excellent tool for writing anything, and I love that I don't even need a special markdown editor. Any text editor can write markdown because markdown uses standard text to denote style. So I started using simple editors like Vim or gedit (or any other editor) and consulted the cheat sheet to remember the simple formatting rules.
|
|
||||||
|
|
||||||
I've been journaling this year as a way of organizing my thoughts and learning more about markdown. I've recently tried the [Ghostwriter][3] text editor, an excellent editor with some extra markdown-specific features. Markdown has become so popular now that many editors incorporate or make it their focus to include syntax highlighting, hints, and other features that make it easy to work in markdown. They're not must-have features, but when you have them, they're nice to have.
|
|
||||||
|
|
||||||
### Trying Mark Text
|
|
||||||
|
|
||||||
While reading a blog, I discovered [Mark Text][4]. Mark Text has tools that make it easy to write markdown while at the same time providing a simple interface that just gets out of my way. Mark Text has six themes: Three light and three dark themes. Dark themes are easier for me to use. The [user documentation][5] is excellent, and there is markdown [syntax help][6] available too.
|
|
||||||
|
|
||||||
### Markdown in real time
|
|
||||||
|
|
||||||
Mark Text provides a real-time preview with a clean and simple interface. It supports the [Commonmark][7] spec, Github Flavored Markdown spec, and Pandoc Markdown. According to its website, Mark Text also supports markdown extensions like KaTex, front matter, and emoji. It outputs HTML and PDF files.
|
|
||||||
|
|
||||||
Mark Text has various editing modes like typewriter mode, source code mode, and focus mode. Adding images is a snap, as you can simply copy and paste them from your clipboard.
|
|
||||||
|
|
||||||
A pop-up at the upper left of the Mark Text window displays the number of characters and paragraphs entered so far. That's really helpful as a writer.
|
|
||||||
|
|
||||||
Saving files is easy from the menu at the upper left of the Mark Text window or use **Ctrl+S**. In fact, the menus of Mark Text look friendly and familiar to anyone who's used to a basic text editor or word processor.
|
|
||||||
|
|
||||||
![Mark Text file menu][8]
|
|
||||||
|
|
||||||
(Don Watkins, [CC BY-SA 4.0][9])
|
|
||||||
|
|
||||||
I love that Mark Text supports various formats with simple keystroke shortcuts, including table blocks, diagrams, in-line formats, math formula blocks, and other code blocks.
|
|
||||||
|
|
||||||
You can download Mark Text for your operating system from the following links:
|
|
||||||
|
|
||||||
* [Linux][10]
|
|
||||||
* [macOS][11]
|
|
||||||
* [Windows][12]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Mark Text is open source with an [MIT][13] license. You can always [download][14] the latest version.
|
|
||||||
|
|
||||||
Alternatively, you can install Mark Text on macOS with `brew install --cask mark-text` and on Windows with [Chocolatey][15] by entering `choco install marktext`.
|
|
||||||
|
|
||||||
Mark Text is always looking for sponsors and developers. The project has a [guide][16] for contributors. In addition, you can support the project on Patreon and Open Collective.
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
via: https://opensource.com/article/21/10/mark-text-markdown-editor
|
|
||||||
|
|
||||||
作者:[Don Watkins][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/don-watkins
|
|
||||||
[b]: https://github.com/lujun9972
|
|
||||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/osdc-docdish-typewriterkeys-3.png?itok=NyBwMdK_ (Typewriter keys in multicolor)
|
|
||||||
[2]: https://opensource.com/downloads/cheat-sheet-markdown
|
|
||||||
[3]: https://wereturtle.github.io/ghostwriter/
|
|
||||||
[4]: https://marktext.app/
|
|
||||||
[5]: https://github.com/marktext/marktext/blob/master/docs/README.md
|
|
||||||
[6]: https://github.com/marktext/marktext/blob/master/docs/MARKDOWN_SYNTAX.md
|
|
||||||
[7]: https://commonmark.org/
|
|
||||||
[8]: https://opensource.com/sites/default/files/uploads/mark-test-file-menu.png (Mark Text file menu)
|
|
||||||
[9]: https://creativecommons.org/licenses/by-sa/4.0/
|
|
||||||
[10]: https://github.com/marktext/marktext/releases/latest/download/marktext-x86_64.AppImage
|
|
||||||
[11]: https://github.com/marktext/marktext/releases/latest/download/marktext.dmg
|
|
||||||
[12]: https://github.com/marktext/marktext/releases/latest/download/marktext-setup.exe
|
|
||||||
[13]: https://github.com/marktext/marktext/blob/develop/LICENSE
|
|
||||||
[14]: https://github.com/marktext/marktext/releases
|
|
||||||
[15]: https://chocolatey.org/
|
|
||||||
[16]: https://github.com/marktext/marktext/blob/develop/CONTRIBUTING.md
|
|
@ -1,178 +0,0 @@
|
|||||||
[#]: subject: "How to Install Rust and Cargo on Ubuntu and Other Linux Distributions"
|
|
||||||
[#]: via: "https://itsfoss.com/install-rust-cargo-ubuntu-linux/"
|
|
||||||
[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/"
|
|
||||||
[#]: collector: "lujun9972"
|
|
||||||
[#]: translator: " "
|
|
||||||
[#]: reviewer: " "
|
|
||||||
[#]: publisher: " "
|
|
||||||
[#]: url: " "
|
|
||||||
|
|
||||||
How to Install Rust and Cargo on Ubuntu and Other Linux Distributions
|
|
||||||
======
|
|
||||||
|
|
||||||
_**Brief: Learn various ways of installing Rust programming language on Linux along with its package manager Cargo.**_
|
|
||||||
|
|
||||||
Ever since Mozilla dumped [Rust][1], it has gained even more prominence and popularity. Don’t just take my words for it. [Rust is going to be included in the Linux kernel][2], only the second programming language after C.
|
|
||||||
|
|
||||||
Many developers have also started making awesome command line based tools in Rust. These tools are often available through the [Cargo package manager][3].
|
|
||||||
|
|
||||||
This is why it matters to install Rust support in Linux, both for the programmers and the end users.
|
|
||||||
|
|
||||||
Officially, Rust documents suggest installing Rust in Linux by downloading and executing the installer script in this manner:
|
|
||||||
|
|
||||||
```
|
|
||||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
|
||||||
```
|
|
||||||
|
|
||||||
That could work. However, your distribution probably already packages Rust. Using your distribution’s [package manager][4] is also an option.
|
|
||||||
|
|
||||||
Let me walk you through the Rust installation steps for both official Rust way and package manager way.
|
|
||||||
|
|
||||||
### Method 1: Installing Rust on any Linux using the official method
|
|
||||||
|
|
||||||
There are a couple of advantages of this method:
|
|
||||||
|
|
||||||
* You get the latest Rust and Cargo version
|
|
||||||
* Rust is only installed for the current user, not system-wide
|
|
||||||
* You do not need to be root or have sudo access to install Rust for yourself this way
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
A few people dislike downloading and [running shell scripts][5] off the internet, even if it is coming from the official sources. However, since it does not need root access and the script is coming from the official sources, it should be safe to install it this way.
|
|
||||||
|
|
||||||
First, make sure that you have Curl installed. Use your distribution’s package manager to install it, if it is not already installed. You can [install Curl on Ubuntu][6] and Debian using the apt command:
|
|
||||||
|
|
||||||
```
|
|
||||||
sudo apt install curl
|
|
||||||
```
|
|
||||||
|
|
||||||
Next, use this command to download the script and run it:
|
|
||||||
|
|
||||||
```
|
|
||||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
|
||||||
```
|
|
||||||
|
|
||||||
![][7]
|
|
||||||
|
|
||||||
It will ask your input for the kind of installation you want. Go with option 1:
|
|
||||||
|
|
||||||
![][8]
|
|
||||||
|
|
||||||
Once the script finishes the installation process, you need to source the configuration file to make the changes available for your shell.
|
|
||||||
|
|
||||||
![][9]
|
|
||||||
|
|
||||||
Source the file:
|
|
||||||
|
|
||||||
```
|
|
||||||
source $HOME/.cargo/env
|
|
||||||
```
|
|
||||||
|
|
||||||
Once it is done, verify that rust is available for you by checking the installed version:
|
|
||||||
|
|
||||||
```
|
|
||||||
rustc --version
|
|
||||||
```
|
|
||||||
|
|
||||||
![Verifying Rust installation][10]
|
|
||||||
|
|
||||||
Super cool. If there is a new version of Rust released, you can update the installed one using:
|
|
||||||
|
|
||||||
```
|
|
||||||
rustup update
|
|
||||||
```
|
|
||||||
|
|
||||||
Let me quickly show how to remove rust installed this way before you see the other installation method.
|
|
||||||
|
|
||||||
#### Removing Rust installed the official way
|
|
||||||
|
|
||||||
In a terminal, use the following command to remove Rust from your system:
|
|
||||||
|
|
||||||
```
|
|
||||||
rustup self uninstall
|
|
||||||
```
|
|
||||||
|
|
||||||
Press Y when asked and you’ll have Rust removed from the system.
|
|
||||||
|
|
||||||
![Removing Rust from Linux][11]
|
|
||||||
|
|
||||||
That’s settled then. Let’s see how to use the apt command to install Rust on Ubuntu.
|
|
||||||
|
|
||||||
### Method 2: Installing Rust support on Ubuntu using apt
|
|
||||||
|
|
||||||
Why would you want to use the package manager?
|
|
||||||
|
|
||||||
* It installs Rust system wide and thus makes it available for all the users on the system
|
|
||||||
* It gets updated centrally with other system updates (if your distribution adds a new version of Rust)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
There are two main Rust packages available in Ubuntu:
|
|
||||||
|
|
||||||
* rustc: The rust compiler used for Rust programming language
|
|
||||||
* cargo: Cargo is the Rust package manager and it automatically installs rustc
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
As a regular user, you would be using Cargo for installing Rust based applications. As a programmer, you’ll need Cargo for getting other Rust packages or create your own.
|
|
||||||
|
|
||||||
Since Cargo includes rustc, I would advise installing it so that all required packages are installed in one go.
|
|
||||||
|
|
||||||
```
|
|
||||||
sudo apt install cargo
|
|
||||||
```
|
|
||||||
|
|
||||||
You’ll be asked to enter your account’s password.
|
|
||||||
|
|
||||||
![][12]
|
|
||||||
|
|
||||||
You are, of course, free to use `apt install rustc` and install only Rust. That choice lies with you.
|
|
||||||
|
|
||||||
You may verify that Rust is installed for you and all the other users (if you want to):
|
|
||||||
|
|
||||||
![][13]
|
|
||||||
|
|
||||||
That’s good. Let me quickly show the uninstall step as well.
|
|
||||||
|
|
||||||
#### Removing Rust using apt remove
|
|
||||||
|
|
||||||
To remove Rust, you can remove Cargo first and then use the autoremove command to remove the dependencies installed with it.
|
|
||||||
|
|
||||||
```
|
|
||||||
sudo apt remove cargo
|
|
||||||
```
|
|
||||||
|
|
||||||
Now run the autoremove:
|
|
||||||
|
|
||||||
```
|
|
||||||
sudo apt autoremove
|
|
||||||
```
|
|
||||||
|
|
||||||
That’s it. You now know all the essentials about installing Rust on Ubuntu and other Linux distributions. Questions and suggestions are always welcome.
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
via: https://itsfoss.com/install-rust-cargo-ubuntu-linux/
|
|
||||||
|
|
||||||
作者:[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://www.rust-lang.org/
|
|
||||||
[2]: https://www.zdnet.com/article/rust-in-the-linux-kernel-why-it-matters-and-whats-happening-next/
|
|
||||||
[3]: https://crates.io/
|
|
||||||
[4]: https://itsfoss.com/package-manager/
|
|
||||||
[5]: https://itsfoss.com/run-shell-script-linux/
|
|
||||||
[6]: https://itsfoss.com/install-curl-ubuntu/
|
|
||||||
[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/10/installing-rust-linux-1.png?resize=800%2C448&ssl=1
|
|
||||||
[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/10/installing-rust-linux-2.png?resize=800%2C448&ssl=1
|
|
||||||
[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/10/installing-rust-linux-3.png?resize=800%2C448&ssl=1
|
|
||||||
[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/10/verify-rust-version.png?resize=800%2C236&ssl=1
|
|
||||||
[11]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/10/remove-rust-linux.png?resize=800%2C378&ssl=1
|
|
||||||
[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/10/install-rust-using-apt-ubuntu.png?resize=759%2C481&ssl=1
|
|
||||||
[13]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/10/verify-rust-install-ubuntu.png?resize=741%2C329&ssl=1
|
|
@ -1,131 +0,0 @@
|
|||||||
[#]: subject: "How to Convert a Webpage to PDF in Linux"
|
|
||||||
[#]: via: "https://itsfoss.com/convert-webpage-pdf-linux/"
|
|
||||||
[#]: author: "Ankush Das https://itsfoss.com/author/ankush/"
|
|
||||||
[#]: collector: "lujun9972"
|
|
||||||
[#]: translator: "geekpi"
|
|
||||||
[#]: reviewer: " "
|
|
||||||
[#]: publisher: " "
|
|
||||||
[#]: url: " "
|
|
||||||
|
|
||||||
How to Convert a Webpage to PDF in Linux
|
|
||||||
======
|
|
||||||
|
|
||||||
Saving a webpage as a PDF comes in handy when you archive certain resources or use them for educational purposes.
|
|
||||||
|
|
||||||
But, how do you convert a webpage to PDF in Linux?
|
|
||||||
|
|
||||||
_**You can either choose to go the easy way out using the web browser (GUI) on every Linux distribution or use the terminal to turn a webpage into a PDF file.**_
|
|
||||||
|
|
||||||
Here, I shall mention both the methods to help you get the job done.
|
|
||||||
|
|
||||||
### Method 1: Converting a Webpage to PDF Using Web Browser
|
|
||||||
|
|
||||||
Even though I use Mozilla Firefox for this tutorial, you can do the same thing with any of the [best browsers available for Linux.][1]
|
|
||||||
|
|
||||||
![][2]
|
|
||||||
|
|
||||||
1\. Load up the webpage you want to convert.
|
|
||||||
|
|
||||||
2\. Head to the browser menu to find the “**Print**” option or use the keyboard shortcut “**Ctrl + P**.”
|
|
||||||
|
|
||||||
3\. By default, it should let you save it as a PDF. You need to hit “Save,” and choose the destination and save the webpage.
|
|
||||||
|
|
||||||
![Save webpage as PDF in Mozilla Firefox][3]
|
|
||||||
|
|
||||||
The one major problem with this simple approach is that it includes all the elements on the page. This may include comments, footer etc. You may use a PDF editor to remove parts of it but that’s an additional task.
|
|
||||||
|
|
||||||
_**A better option is to utilize a browser extension like [Print Friendly][4]. It allows you to edit and remove parts of the webpage before downloading the PDF.**_
|
|
||||||
|
|
||||||
### Method 2: Converting a Webpage to PDF or Images Using the Terminal
|
|
||||||
|
|
||||||
You probably already know that you can [browse internet in Linux terminal][5] and even [download files using the command line][6]. That’s not surprising considering you can do a lot more in the terminal, including downloading a webpage as PDF.
|
|
||||||
|
|
||||||
A nifty open-source command-line tools **wkhtmltopdf** and **wkhtmltoimage** come to the rescue that lets you convert any HTML webpage to a PDF or image file.
|
|
||||||
|
|
||||||
It utilizes the Qt WebKit rendering engine to get the task done. You can explore its [GitHub page][7] for more information.
|
|
||||||
|
|
||||||
You should be able to install it from the default repository of your Linux distribution. For Ubuntu-based distros, you can type in the command:
|
|
||||||
|
|
||||||
```
|
|
||||||
sudo apt install wkhtmltopdf
|
|
||||||
```
|
|
||||||
|
|
||||||
It is pretty straightforward to use no matter whether you want to convert it to a PDF or image file:
|
|
||||||
|
|
||||||
![][8]
|
|
||||||
|
|
||||||
To convert a webpage into a PDF, type in:
|
|
||||||
|
|
||||||
```
|
|
||||||
wkhtmltopdf URL/domain filename.pdf
|
|
||||||
```
|
|
||||||
|
|
||||||
As an example, here’s how it would look:
|
|
||||||
|
|
||||||
```
|
|
||||||
wkhtmltopdf linuxmint.com mint.pdf
|
|
||||||
```
|
|
||||||
|
|
||||||
You can choose to use the complete URL as “**<https://linuxmint.com**”> or use the domain name as shown in the example above.
|
|
||||||
|
|
||||||
The file generated will be saved in the home directory by default.
|
|
||||||
|
|
||||||
You also get a few exciting options when converting a webpage.
|
|
||||||
|
|
||||||
For instance, you can **apply a grayscale filter to the PDF file**, **make multiple copies of the page** in the same file, and **exclude images** during conversion.
|
|
||||||
|
|
||||||
The grayscale filter may not work on every webpage, but you can try that using the command:
|
|
||||||
|
|
||||||
```
|
|
||||||
wkhtmltopdf -g google.com googlepage.pdf
|
|
||||||
```
|
|
||||||
|
|
||||||
To make multiple copies of pages in the same PDF file, the command would be:
|
|
||||||
|
|
||||||
```
|
|
||||||
wkhtmltopdf --copies 2 linuxmint.com mint.pdf
|
|
||||||
```
|
|
||||||
|
|
||||||
And, if you want to exclude images from the web pages, just type:
|
|
||||||
|
|
||||||
```
|
|
||||||
wkhtmltopdf --no-images linuxmint.com mint.pdf
|
|
||||||
```
|
|
||||||
|
|
||||||
Additionally, if you want to convert a webpage as an image, the command would look like this:
|
|
||||||
|
|
||||||
```
|
|
||||||
wkhtmltoimage linuxmint.com mint.png
|
|
||||||
```
|
|
||||||
|
|
||||||
Note that unlike the GUI method using a browser, using these tools via the terminal has its limitation. It does not seem to convert web pages utilizing any <iframe> code snippets successfully.
|
|
||||||
|
|
||||||
Sites like ours and even DuckDuckGo didn’t convert to PDF or an image. However, simple HTML sites like Linuxmint.com, Ubuntu.com, Google.com, worked like charm.
|
|
||||||
|
|
||||||
### Wrapping Up
|
|
||||||
|
|
||||||
To get the best results, saving a webpage as a PDF using a browser seems to be the way to go. But, if you want more options and go through the terminal, the **wkhtmltopdf** utility should come in handy.
|
|
||||||
|
|
||||||
How do you prefer to convert web pages to PDF in Linux? Feel free to share your thoughts in the comments.
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
via: https://itsfoss.com/convert-webpage-pdf-linux/
|
|
||||||
|
|
||||||
作者:[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/best-browsers-ubuntu-linux/
|
|
||||||
[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/10/mozilla-save-webpage-pdf.png?resize=800%2C536&ssl=1
|
|
||||||
[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/10/mozilla-firefox-print-pdf-1.png?resize=602%2C584&ssl=1
|
|
||||||
[4]: https://www.printfriendly.com/
|
|
||||||
[5]: https://itsfoss.com/terminal-web-browsers/
|
|
||||||
[6]: https://itsfoss.com/download-files-from-linux-terminal/
|
|
||||||
[7]: https://github.com/wkhtmltopdf/wkhtmltopdf
|
|
||||||
[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/10/htmltopdf-mint.png?resize=736%2C344&ssl=1
|
|
@ -1,113 +0,0 @@
|
|||||||
[#]: subject: "How to Install themes on Xubuntu and Other Distros Using Xfce Desktop Environment"
|
|
||||||
[#]: via: "https://itsfoss.com/install-themes-xfce-xubuntu/"
|
|
||||||
[#]: author: "Ankush Das https://itsfoss.com/author/ankush/"
|
|
||||||
[#]: collector: "lujun9972"
|
|
||||||
[#]: translator: "geekpi"
|
|
||||||
[#]: reviewer: " "
|
|
||||||
[#]: publisher: " "
|
|
||||||
[#]: url: " "
|
|
||||||
|
|
||||||
How to Install themes on Xubuntu and Other Distros Using Xfce Desktop Environment
|
|
||||||
======
|
|
||||||
|
|
||||||
_**Brief: This is a step-by-step beginner’s tutorial to show how to install themes and icons in Xubuntu and other Linux distributions that use Xfce desktop environment.**_
|
|
||||||
|
|
||||||
Installing themes on Xubuntu is similar to Ubuntu or any other Linux distribution. You put the theme files in the ~/.themes folder and then use a tool to change it.
|
|
||||||
|
|
||||||
However, some options or the user interface will look different considering Xubuntu uses the [Xfce desktop environment][1]. This is why I created this specific tutorial to show the steps with proper screenshots.
|
|
||||||
|
|
||||||
### Install new themes in Xubuntu (Xfce)
|
|
||||||
|
|
||||||
To get started, you need to create a **.themes** folder in the home directory. Mind the dot (.) before the folder name. It’s important and hides the folder from normal view.
|
|
||||||
|
|
||||||
To check if you already have it, you can [enable viewing hidden files][2] and then create it if it isn’t present.
|
|
||||||
|
|
||||||
![][3]
|
|
||||||
|
|
||||||
Once done, you need to download a theme.
|
|
||||||
|
|
||||||
1\. You can browse for XFCE themes on the [Xfce-look][4] portal. All you have to do is download the archive (compressed) file.
|
|
||||||
|
|
||||||
2\. Next, you need to [extract the zip file][5], as shown in the screenshot below.
|
|
||||||
|
|
||||||
![][6]
|
|
||||||
|
|
||||||
3\. Once you extract it, you will notice a folder appear, and you will have to copy it.
|
|
||||||
|
|
||||||
![][7]
|
|
||||||
|
|
||||||
4\. You will have to then paste this folder into the **.themes** directory that you created initially.
|
|
||||||
|
|
||||||
![][8]
|
|
||||||
|
|
||||||
5\. Finally, you need to head to the Appearance setting to find it listed and select it/apply it for it to take effect.
|
|
||||||
|
|
||||||
![][9]
|
|
||||||
|
|
||||||
As you notice in the screenshot below, the new theme has been added and applied:
|
|
||||||
|
|
||||||
![][10]
|
|
||||||
|
|
||||||
In addition to the theme, if you need to customize the icons of your Xubuntu desktop, you need to create another .icons folder in the home directory.
|
|
||||||
|
|
||||||
Like you installed the theme, you will have to follow a similar process to apply the icon themes.
|
|
||||||
|
|
||||||
To give you an example, let me highlight those steps here:
|
|
||||||
|
|
||||||
### Adding icon themes in Xubuntu (Xfce)
|
|
||||||
|
|
||||||
You can browse through the same [xfce-look portal][11] to look for complete icon themes.
|
|
||||||
|
|
||||||
Or, you can explore some of the best [icon themes available for Ubuntu][12] that should work for Xubuntu as well.
|
|
||||||
|
|
||||||
Once you find the one you like, download it, and extract it as shown below.
|
|
||||||
|
|
||||||
![][13]
|
|
||||||
|
|
||||||
Next, you will have to copy and paste the folder into the .**icons** folder.
|
|
||||||
|
|
||||||
![][14]
|
|
||||||
|
|
||||||
Now, you can head back to the Appearance settings and find the icon listed under the “Icons” available.
|
|
||||||
|
|
||||||
To show you the difference, **I changed the default Xubuntu theme to adwaita-dark**, as you can see here:
|
|
||||||
|
|
||||||
![][15]
|
|
||||||
|
|
||||||
**Note**: Some icon or theme files may contain nested folders with different variants in it. You’ll notice that they do not appear in the appearance tool. If that’s the case, copy the inner folder directly in ~/.themes or ~/.icons folder.
|
|
||||||
|
|
||||||
### Wrapping Up
|
|
||||||
|
|
||||||
With both the style and icons tweaked, you can [customize your Xubuntu experience][16] to blend in with your taste.
|
|
||||||
|
|
||||||
Do you prefer the default Xubuntu look or customize the look of it using different themes/icons? Let me know your thoughts in the comments.
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
via: https://itsfoss.com/install-themes-xfce-xubuntu/
|
|
||||||
|
|
||||||
作者:[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://xfce.org/
|
|
||||||
[2]: https://itsfoss.com/hide-folders-and-show-hidden-files-in-ubuntu-beginner-trick/
|
|
||||||
[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/10/xubuntu-hidden-files.png?resize=674%2C300&ssl=1
|
|
||||||
[4]: https://www.xfce-look.org/browse?cat=138&ord=latest
|
|
||||||
[5]: https://itsfoss.com/unzip-linux/
|
|
||||||
[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/10/extract-xubuntu-theme.png?resize=719%2C537&ssl=1
|
|
||||||
[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/10/extracted-xubuntu-theme.png?resize=709%2C272&ssl=1
|
|
||||||
[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/10/copy-theme-xubuntu.png?resize=705%2C328&ssl=1
|
|
||||||
[9]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/10/appearance-xfce.png?resize=703%2C544&ssl=1
|
|
||||||
[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/10/xpro-xubuntu-theme.png?resize=1162%2C599&ssl=1
|
|
||||||
[11]: https://www.xfce-look.org/browse?cat=132&ord=latest
|
|
||||||
[12]: https://itsfoss.com/best-icon-themes-ubuntu-16-04/
|
|
||||||
[13]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/10/xubuntu-icon-theme.png?resize=756%2C560&ssl=1
|
|
||||||
[14]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/10/xubuntu-icon-theme-selection.png?resize=739%2C534&ssl=1
|
|
||||||
[15]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/10/xubuntu-icon-theme-change.png?resize=1154%2C619&ssl=1
|
|
||||||
[16]: https://itsfoss.com/customize-xfce/
|
|
@ -0,0 +1,161 @@
|
|||||||
|
[#]: subject: "Deploy Quarkus applications to Kubernetes using a Helm chart"
|
||||||
|
[#]: via: "https://opensource.com/article/21/10/quarkus-helm-chart"
|
||||||
|
[#]: author: "Daniel Oh https://opensource.com/users/daniel-oh"
|
||||||
|
[#]: collector: "lujun9972"
|
||||||
|
[#]: translator: " "
|
||||||
|
[#]: reviewer: " "
|
||||||
|
[#]: publisher: " "
|
||||||
|
[#]: url: " "
|
||||||
|
|
||||||
|
Deploy Quarkus applications to Kubernetes using a Helm chart
|
||||||
|
======
|
||||||
|
A developer's guide to serverless function deployment with Quarkus Helm
|
||||||
|
chart.
|
||||||
|
![Ships at sea on the web][1]
|
||||||
|
|
||||||
|
Serverless functions are driving the fast adoption of DevOps development and deployment practices today. [Knative][2] on [Kubernetes][3] is one of the most popular serverless platforms to adopt serverless function architectures successfully. But developers must understand how serverless capabilities are specified using a combination of Kubernetes APIs, Knative resources, and function-oriented programming. DevOps teams also need to standardize runtime stacks (that is, application runtime, builder image, deployment configuration, and health check) to execute the functions on Kubernetes. What if you, a developer, could set this up with familiar technology and practice?
|
||||||
|
|
||||||
|
This article guides you on the way developers can get started with serverless function deployment with the [Quarkus][4] [Helm][5] chart on Kubernetes. Furthermore, developers can avoid the extra work of developing a function from scratch, optimizing the application, and deploying it to Kubernetes.
|
||||||
|
|
||||||
|
If you haven't experienced using Helm for cloud-native application deployments on Kubernetes, I will tell you what Helm is and what benefits you have with it. Helm is one of the most popular package managers for Kubernetes. Helm provides a chart that simplifies Kubernetes resources within a single package file for an application build and deployment. Developers can install the chart to Kubernetes using the Helm command-line interface or graphical dashboard.
|
||||||
|
|
||||||
|
### Install Quarkus Helm chart
|
||||||
|
|
||||||
|
In this article, you'll use [OpenShift Kubernetes Distribution][6] (OKD) built on Kubernetes with application lifecycle management functionality and DevOps tooling. If you haven't installed the Helm feature on your OKD cluster yet, follow the [installation document][7].
|
||||||
|
|
||||||
|
Before building a Quarkus application using a Quarkus Helm chart, you need to create pull and push secrets in your OKD cluster. You use the secrets to pull a builder image from an external container registry and then push it to the registry.
|
||||||
|
|
||||||
|
**Note:** You can skip this step if you don't need to use an external container registry during application build or deploy the application to the OKD cluster.
|
||||||
|
|
||||||
|
Create a pull secret using the following [oc command][8]:
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
$ oc create secret docker-registry my-pull-secret \
|
||||||
|
\--docker-server=$SERVER_URL \
|
||||||
|
\--docker-username=$USERNAME \
|
||||||
|
\--docker-password=$PASSWORD \
|
||||||
|
\--docker-email=$EMAIL
|
||||||
|
```
|
||||||
|
|
||||||
|
Then, create a push secret using the following command:
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
$ oc create secret docker-registry my-push-secret \
|
||||||
|
\--docker-server=$SERVER_URL \
|
||||||
|
\--docker-username=$USERNAME \
|
||||||
|
\--docker-password=$PASSWORD \
|
||||||
|
\--docker-email=$EMAIL
|
||||||
|
```
|
||||||
|
|
||||||
|
Install the Quarkus Helm chart:
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
$ helm repo add quarkus \
|
||||||
|
<https://github.com/redhat-developer/redhat-helm-charts>
|
||||||
|
```
|
||||||
|
|
||||||
|
### Build and deploy Quarkus application using Helm chart
|
||||||
|
|
||||||
|
Go to the **Developer** console in the OKD cluster, click on Helm chart in **+Add** menu. Then type in _quarkus_ in the search box. Click on the **Quarkus v0.0.3** helm chart, as shown below.
|
||||||
|
|
||||||
|
**Note:** You'll need to create a _quarkus-helm project_ (namespace) to install a Quarkus Helm chart in your OKD cluster.
|
||||||
|
|
||||||
|
![Search Quarkus Helm chart][9]
|
||||||
|
|
||||||
|
(Daniel Oh, [CC BY-SA 4.0][10])
|
||||||
|
|
||||||
|
Click on **Install Helm Chart**, as shown below.
|
||||||
|
|
||||||
|
![Install Helm chart][11]
|
||||||
|
|
||||||
|
(Daniel Oh, [CC BY-SA 4.0][10])
|
||||||
|
|
||||||
|
Switch the editor to **YAML** view, then paste the following build and deploy configurations:
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
build:
|
||||||
|
uri: <https://github.com/redhat-mw-demos/todo-demo-app.git>
|
||||||
|
ref: master
|
||||||
|
env:
|
||||||
|
- name: S2I_SOURCE_DEPLOYMENTS_FILTER
|
||||||
|
value: "*-runner.jar lib*"
|
||||||
|
deploy:
|
||||||
|
readinessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /health/ready
|
||||||
|
port: http
|
||||||
|
tcpSocket: null
|
||||||
|
livenessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /health/live
|
||||||
|
port: http
|
||||||
|
tcpSocket: null
|
||||||
|
```
|
||||||
|
|
||||||
|
Then, click on the **Install** button, as shown below.
|
||||||
|
|
||||||
|
![YAML editor][12]
|
||||||
|
|
||||||
|
(Daniel Oh, [CC BY-SA 4.0][10])
|
||||||
|
|
||||||
|
Find more values to configure the Quarkus helm chart [here][13].
|
||||||
|
|
||||||
|
Once the chart gets installed successfully, you'll see the following Quarkus pod in the Topology view, as shown below.
|
||||||
|
|
||||||
|
![Topology view][14]
|
||||||
|
|
||||||
|
(Daniel Oh, [CC BY-SA 4.0][10])
|
||||||
|
|
||||||
|
**Note:** You might see _ErrImagePull_ and _ImagePullBackOff_ in **Deployments** while the build is processing. Once the build completes, your image gets automatically rolled out.
|
||||||
|
|
||||||
|
Click on the **Open URL** icon. It brings you to the **todos** application. Let's try to add a few items for fun, as shown below.
|
||||||
|
|
||||||
|
![Todos applications][15]
|
||||||
|
|
||||||
|
(Daniel Oh, [CC BY-SA 4.0][10])
|
||||||
|
|
||||||
|
### Conclusion
|
||||||
|
|
||||||
|
You've learned the way developers can build Quarkus applications and deploy them to Kubernetes/OpenShift cluster in a few minutes using a Helm chart. The developers can manage the application runtime stack in terms of upgrade, rollback, uninstall, and add new configurations such as application health check, replication without changing the application source code or developing new Kubernetes manifestos with YAML files. This minimizes developers' burden to keep leveraging application runtimes other than implementing business logic on Kubernetes. For more information to follow on Quarkus journey here:
|
||||||
|
|
||||||
|
* [A Java developer's guide to Quarkus][16]
|
||||||
|
* [3 reasons Quarkus 2.0 improves developer productivity on Linux][17]
|
||||||
|
* [Optimize Java serverless functions in Kubernetes][18]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
via: https://opensource.com/article/21/10/quarkus-helm-chart
|
||||||
|
|
||||||
|
作者:[Daniel Oh][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/daniel-oh
|
||||||
|
[b]: https://github.com/lujun9972
|
||||||
|
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/kubernetes_containers_ship_lead.png?itok=9EUnSwci (Ships at sea on the web)
|
||||||
|
[2]: https://knative.dev/docs/
|
||||||
|
[3]: https://opensource.com/article/19/6/reasons-kubernetes
|
||||||
|
[4]: https://quarkus.io/
|
||||||
|
[5]: https://helm.sh/
|
||||||
|
[6]: https://www.okd.io/
|
||||||
|
[7]: https://docs.okd.io/latest/applications/working_with_helm_charts/installing-helm.html
|
||||||
|
[8]: https://docs.okd.io/latest/cli_reference/openshift_cli/getting-started-cli.html
|
||||||
|
[9]: https://opensource.com/sites/default/files/uploads/search-quarkus-helm-chart.png (Search Quarkus Helm chart)
|
||||||
|
[10]: https://creativecommons.org/licenses/by-sa/4.0/
|
||||||
|
[11]: https://opensource.com/sites/default/files/uploads/install-hel-chart.png (Install Helm chart)
|
||||||
|
[12]: https://opensource.com/sites/default/files/uploads/yaml-editor.png (YAML editor)
|
||||||
|
[13]: https://github.com/redhat-developer/redhat-helm-charts/tree/master/alpha/quarkus-chart#values
|
||||||
|
[14]: https://opensource.com/sites/default/files/uploads/topology-view.png (Topology view)
|
||||||
|
[15]: https://opensource.com/sites/default/files/uploads/todos-applications.png (Todos applications)
|
||||||
|
[16]: https://opensource.com/article/21/8/java-quarkus-ebook
|
||||||
|
[17]: https://opensource.com/article/21/7/developer-productivity-linux
|
||||||
|
[18]: https://opensource.com/article/21/6/java-serverless-functions-kubernetes
|
@ -0,0 +1,105 @@
|
|||||||
|
[#]: subject: "Ferdi: A Free & Open-Source Alternative to Franz & Rambox"
|
||||||
|
[#]: via: "https://itsfoss.com/ferdi/"
|
||||||
|
[#]: author: "Ankush Das https://itsfoss.com/author/ankush/"
|
||||||
|
[#]: collector: "lujun9972"
|
||||||
|
[#]: translator: "geekpi"
|
||||||
|
[#]: reviewer: " "
|
||||||
|
[#]: publisher: " "
|
||||||
|
[#]: url: " "
|
||||||
|
|
||||||
|
Ferdi: A Free & Open-Source Alternative to Franz & Rambox
|
||||||
|
======
|
||||||
|
|
||||||
|
_**Brief:**_ _Ferdi is a promising open-source application with more free features as an alternative to Franz and Rambox. Let us explore more about it._
|
||||||
|
|
||||||
|
A single application to help you manage multiple services comes in handy when you do not want to do everything on your browser. While technically, you can, it may not be the most organized way of doing things.
|
||||||
|
|
||||||
|
Hence, options like [Rambox][1] and [Franz][2] are pretty popular cross-platform solutions to sign in to several services and access all of them at a glance.
|
||||||
|
|
||||||
|
Even though they both are available for Linux (and we’ve covered them separately), they offer limited features for free.
|
||||||
|
|
||||||
|
In contrast, Ferdi is a fork of Franz offering many premium functionalities for free while aiming to provide a better experience.
|
||||||
|
|
||||||
|
### Ferdi: Dabble With Multiple Applications in One Place
|
||||||
|
|
||||||
|
![][3]
|
||||||
|
|
||||||
|
Ferdi is a free and open-source application that lets you add multiple applications, including various messaging services, in one place.
|
||||||
|
|
||||||
|
It also lets you customize various aspects of the application and its behavior. If you like applications like Rambox and Franz, you should explore more about Ferdi.
|
||||||
|
|
||||||
|
### Features of Ferdi
|
||||||
|
|
||||||
|
![][4]
|
||||||
|
|
||||||
|
You can find tons of features available without needing to pay a premium. Here, I shall highlight some key features:
|
||||||
|
|
||||||
|
* Cross-platform support (Linux, Windows, and macOS)
|
||||||
|
* Wide range of messaging services included (Slack, WhatsApp, Element, etc.)
|
||||||
|
* Supports signing in with Franz account
|
||||||
|
* Ability to password-protect messages
|
||||||
|
* Option to use your custom server
|
||||||
|
* Quick to-do list access with the option to use Franz Todo, Todoist, Microsoft To Do, Any.do, and more.
|
||||||
|
* Tweak performance by unloading applications when not in use (Hibernation)
|
||||||
|
* Private notification to hide your messages
|
||||||
|
* Do not disturb mode support
|
||||||
|
* Dark mode with the option to toggle every app added separately
|
||||||
|
* Cloud sync
|
||||||
|
* No restrictions on the number of accounts
|
||||||
|
* Ability to set up a proxy and connect through it
|
||||||
|
* Add multiple workspaces
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Thoughts on Using Ferdi
|
||||||
|
|
||||||
|
![][5]
|
||||||
|
|
||||||
|
Just like Rambox and Franz, Ferdi won’t shy away from consuming a good chunk of your resources. So, you need to keep in mind whether you have enough memory (RAM) to have several applications active within Ferdi.
|
||||||
|
|
||||||
|
It is good to have the option to unload applications when not in use. So, in case you are low on resources, you might want to utilize the Hibernation option.
|
||||||
|
|
||||||
|
![][6]
|
||||||
|
|
||||||
|
Ferdi also offers some advanced options like GPU acceleration, universal dark mode, privacy toggles, appearance customization, and more. You can even add custom services that you do not find listed.
|
||||||
|
|
||||||
|
![][7]
|
||||||
|
|
||||||
|
Overall, you get many features and choices when it comes to Ferdi. You should be able to organize multiple applications efficiently with the available set of options.
|
||||||
|
|
||||||
|
### Installing Ferdi in Linux
|
||||||
|
|
||||||
|
Ferdi offers multiple packages for easy installation on Linux. You can find a DEB/RPM package for Ubuntu/Fedora, an [AppImage file][8] for all other Linux distributions.
|
||||||
|
|
||||||
|
They also provide a snap package along with the ability to install it via [AUR][9]. So, you have plenty of options to get it installed on your Linux computer.
|
||||||
|
|
||||||
|
You can explore their [GitHub page][10] and head to its releases section to download them or visit the official site.
|
||||||
|
|
||||||
|
[Download Ferdi][11]
|
||||||
|
|
||||||
|
Have you tried Ferdi yet? Does it serve the purpose of replacing Franz or Rambox? Is it better? Share your experience in the comments down below.
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
via: https://itsfoss.com/ferdi/
|
||||||
|
|
||||||
|
作者:[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/rambox/
|
||||||
|
[2]: https://itsfoss.com/franz-messaging-app/
|
||||||
|
[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/10/ferdi-screenshot.png?resize=800%2C621&ssl=1
|
||||||
|
[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/10/ferdi-screenshot-1.png?resize=800%2C584&ssl=1
|
||||||
|
[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/10/ferdi-custom-services.png?resize=800%2C586&ssl=1
|
||||||
|
[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/10/ferdi-workspaces.png?resize=800%2C627&ssl=1
|
||||||
|
[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/10/ferdi-advanced-options.png?resize=800%2C541&ssl=1
|
||||||
|
[8]: https://itsfoss.com/appimage-interview/
|
||||||
|
[9]: https://itsfoss.com/aur-arch-linux/
|
||||||
|
[10]: https://github.com/getferdi/ferdi
|
||||||
|
[11]: https://getferdi.com/
|
@ -0,0 +1,386 @@
|
|||||||
|
[#]: subject: "How I made an automated Jack-o'-lantern with a Raspberry Pi"
|
||||||
|
[#]: via: "https://opensource.com/article/21/10/halloween-raspberry-pi"
|
||||||
|
[#]: author: "Jessica Cherry https://opensource.com/users/cherrybomb"
|
||||||
|
[#]: collector: "lujun9972"
|
||||||
|
[#]: translator: " "
|
||||||
|
[#]: reviewer: " "
|
||||||
|
[#]: publisher: " "
|
||||||
|
[#]: url: " "
|
||||||
|
|
||||||
|
How I made an automated Jack-o'-lantern with a Raspberry Pi
|
||||||
|
======
|
||||||
|
Here's my recipe for the perfect pumpkin Pi.
|
||||||
|
![A vignette of green, orange, and yellow pumpkins in front of a brick wall][1]
|
||||||
|
|
||||||
|
It's almost Halloween, one of my favorite days and party times. This year, I decided to (pumpkin) spice up some of my decorations with automated motion sensing. This spooktacular article shows you how I made them, step by step, from building and wiring to coding. This is not your average weekend project—it takes a lot of supplies and building time. But it's a fun way to play around with Raspberry Pi and get in the spirit of this haunting holiday.
|
||||||
|
|
||||||
|
### What you need for this project
|
||||||
|
|
||||||
|
* One large plastic pumpkin
|
||||||
|
* One Raspberry Pi 4 (with peripherals)
|
||||||
|
* One Arduino starter kit that works with Raspberry Pi
|
||||||
|
* One hot glue gun
|
||||||
|
* Ribbon, ideally in holiday theme colors
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
The items you'll need in the starter kit are one infrared motion sensor, a breadboard, two small LED lights, a ribbon to connect the breadboard to the Raspberry Pi, and cabling to configure all of these pieces together. You can find each of these items online, and I suggest the starter kit for the entertaining things you can do beyond this project.
|
||||||
|
|
||||||
|
![Raspberry Pi computer board][2]
|
||||||
|
|
||||||
|
Jess Cherry CC BY-SA 4.0
|
||||||
|
|
||||||
|
![Cables and and LEDs for the project][3]
|
||||||
|
|
||||||
|
Jess Cherry CC BY-SA 4.0
|
||||||
|
|
||||||
|
![Project supplies including breadboard, cables, LEDs, and elements of the Arduino starter kit][4]
|
||||||
|
|
||||||
|
Jess Cherry CC BY-SA 4.0
|
||||||
|
|
||||||
|
### Installing the Raspberry Pi OS and preconfiguration
|
||||||
|
|
||||||
|
After receiving my Pi, including the SD card, I went online and followed the Raspberry Pi imager [instructions][5]. This allowed for quick installation of the OS onto the SD card. Note: you need the ability to put the SD card in an SD card-reader slot. I have an external attached SD card reader, but some computers have them built in. On your local computer, you also need a VNC viewer.
|
||||||
|
|
||||||
|
After installing the OS and running updates, I had some extra steps to get everything to work correctly. To do this, you'll need the following:
|
||||||
|
|
||||||
|
* Python 3
|
||||||
|
* Python3-devel
|
||||||
|
* Pip
|
||||||
|
* RPi GPIO (pip install RPi.GPIO)
|
||||||
|
* A code editor (Thonny is on the Raspberry Pi OS)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Next, set up a VNCviewer, so you can log in when you have the Pi hidden in your pumpkin.
|
||||||
|
|
||||||
|
To do this, run the below command, then follow the instructions below.
|
||||||
|
|
||||||
|
`sudo raspi-config`
|
||||||
|
|
||||||
|
When this menu pops up, choose Interface Options:
|
||||||
|
|
||||||
|
![Raspberry Pi Software Configuration Tool menu][6]
|
||||||
|
|
||||||
|
Jess Cherry CC BY-SA 4.0
|
||||||
|
|
||||||
|
Next, choose VNC and enable it on the pop-up:
|
||||||
|
|
||||||
|
![Raspberry Pi Software Configuration Tool menu of interface options][7]
|
||||||
|
|
||||||
|
Jess Cherry CC BY-SA 4.0
|
||||||
|
|
||||||
|
You can also use Secure Shell (SSH) for this, but during the troubleshooting phase, I used VNC. When logged into your Raspberry Pi, gather the IP address and use it for SSH and a VNC connection. If you've moved rooms, you can also use your router or WiFi switch to tell you the IP address of the Pi.
|
||||||
|
|
||||||
|
Now that everything is installed, you can move on to building your breadboard with lights.
|
||||||
|
|
||||||
|
### Everyone should try pumpkin bread(board)
|
||||||
|
|
||||||
|
Many people haven't seen or worked with a breadboard, so I've added pictures of my parts, starting with my base components.
|
||||||
|
|
||||||
|
![GPIO Extension Board and Ribbon Cable][8]
|
||||||
|
|
||||||
|
Jess Cherry CC BY-SA 4.0
|
||||||
|
|
||||||
|
![Breadboard][9]
|
||||||
|
|
||||||
|
Jess Cherry CC BY-SA 4.0
|
||||||
|
|
||||||
|
These two pieces are put together with the extension shield in the center, as shown.
|
||||||
|
|
||||||
|
![Breadboard with cables, pins, and ribbons, partially set up for the project][10]
|
||||||
|
|
||||||
|
Jess Cherry CC BY-SA 4.0
|
||||||
|
|
||||||
|
The ribbon connects to the pin slot in the Raspberry Pi, making the board a new extension we can code and play with. The ribbon isn't required, it's just makes working with the GPIO pins convenient. If you don't want to purchase a ribbon, you can connect female-to-male jumper cables directly from the pins on the Pi to the breadboard. Here are the components you need:
|
||||||
|
|
||||||
|
* Raspberry Pi (version 4 or 3)
|
||||||
|
* Breadboard
|
||||||
|
* GPIO expansion ribbon cable
|
||||||
|
* Jumper cables (x6 male-to-male)
|
||||||
|
* Resistor 220Ω
|
||||||
|
* HC-SR501 or any similar proximity sensor (x1)
|
||||||
|
* LED (x2)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Putting the board together
|
||||||
|
|
||||||
|
Once you have all of the pieces, you can put everything together. First, take a look at how the pins are defined on the board. This is my personal extension board; the one you have may be different. The pin definitions matter when you get to coding, so keep very good track of your cabling. Below is the schematic of my extension.
|
||||||
|
|
||||||
|
As you can see, the schematic has both the defined BCM (Broadcom SOC Channel) GPIO numbering on the physical board and the physical numbering you use within the code to create routines and functions.
|
||||||
|
|
||||||
|
![Schematic of Raspberry Pi extension board][11]
|
||||||
|
|
||||||
|
Jess Cherry CC BY-SA 4.0
|
||||||
|
|
||||||
|
Now it's time to connect some cabling. First, start with the sensor. I was provided with cables to connect in my kit, so I'll add pictures as I go. This is the sensor with a power(+) ground(-) and sensor connection to extension board(s).
|
||||||
|
|
||||||
|
![Sensor illustration with power, ground, and sensor connection][12]
|
||||||
|
|
||||||
|
Jess Cherry CC BY-SA 4.0
|
||||||
|
|
||||||
|
For the cable colors: power is red, ground is black, and yellow carries the sensor data.
|
||||||
|
|
||||||
|
![Photo of a hand holding the sensor with black, red, and yellow cables][13]
|
||||||
|
|
||||||
|
Jess Cherry CC BY-SA 4.0
|
||||||
|
|
||||||
|
I plug in the cables with power/red to the 5V pin, ground/black to the GRN pin, and sensor/yellow to the GPIO 17 pin, later to be defined as 11 in the code.
|
||||||
|
|
||||||
|
![Breadboard with sensor cables attached][14]
|
||||||
|
|
||||||
|
Jess Cherry CC BY-SA 4.0
|
||||||
|
|
||||||
|
Next, it's time to set up the lights. Each LED light has two pins, one shorter than the other. The long side (anode) always lines up with the pin cable, and the shorter (cathode) with the ground and resistor.
|
||||||
|
|
||||||
|
![LED light with pin, cables, and resistor][15]
|
||||||
|
|
||||||
|
Jess Cherry CC BY-SA 4.0
|
||||||
|
|
||||||
|
For the first light, I use GPIO18 (pin 12) and GPIO25 for the signal. This is important because the code communicates with these pins. You can change which pin you use, but then you must change the code. Here's a diagram of the end result:
|
||||||
|
|
||||||
|
![Illustration of connections from breadboard to Raspberry Pi, sensor, and LEDs][16]
|
||||||
|
|
||||||
|
Jess Cherry CC BY-SA 4.0
|
||||||
|
|
||||||
|
Now that everything is cabled up, it's time to start working on the code.
|
||||||
|
|
||||||
|
### How to use a snake to set up a pumpkin
|
||||||
|
|
||||||
|
If you've already installed Python 3, you have everything you need to start working through this line by line. In this example, I am using Python 3 with the RPI package. Start with the imported packages, RPI and time from sleep (this helps create the flicker effect described later in the tutorial). I called my Python file senseled.py, but you can name your file whatever you want.
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
import RPi.GPIO as GPIO
|
||||||
|
import os
|
||||||
|
from time import sleep
|
||||||
|
```
|
||||||
|
|
||||||
|
Next, define your two LED pins and sensor pin. Earlier in this post, I provided these pin numbers while wiring the card, so you can see those exact numbers below.
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
ledPin1 = 12 # define ledPins
|
||||||
|
ledPin2 = 22
|
||||||
|
sensorPin = 11 # define sensorPin
|
||||||
|
```
|
||||||
|
|
||||||
|
Since you have two lights to set up to flicker together in this example, I also created a defined array to use later:
|
||||||
|
|
||||||
|
`leds = [ledPin1, ledPin2]`
|
||||||
|
|
||||||
|
Next, define the setup of the board and pins using the RPi.GPIO package. To do this, set the mode on the board. I chose to use the physical numbering system in my setup, but you can use the BCM if you prefer. Remember that you can never use both. Here's an example of each:
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
# for GPIO numbering, choose BCM
|
||||||
|
GPIO.setmode(GPIO.BCM)
|
||||||
|
|
||||||
|
# or, for pin numbering, choose BOARD
|
||||||
|
GPIO.setmode(GPIO.BOARD)
|
||||||
|
```
|
||||||
|
|
||||||
|
For this example, use the pin numbering in my setup. Set the two pins to output mode, which means all commands output to the lights. Then, set the sensor to input mode so that as the sensor sees movement, it inputs the data to the board to output the lights. This is what these definitions look like:
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
def setup():
|
||||||
|
GPIO.setmode(GPIO.BOARD) # use PHYSICAL GPIO Numbering
|
||||||
|
GPIO.setup(ledPin1, GPIO.OUT) # set ledPin to OUTPUT mode
|
||||||
|
GPIO.setup(ledPin2, GPIO.OUT) # set ledPin to OUTPUT mode
|
||||||
|
GPIO.setup(sensorPin, GPIO.IN) # set sensorPin to INPUT mode
|
||||||
|
```
|
||||||
|
|
||||||
|
Now that the board and pins are defined, you can put together your main function. For this, I use the array in a `for` loop, then an if statement based on the sensor input. If you are unfamiliar with these functions, you can check out this [quick guide][17].
|
||||||
|
|
||||||
|
If the sensor receives input, the LED output is high (powered on) for .03 seconds, then low (powered off) while printing the message `led turned on.` If the sensor receives no input, the LEDs are powered down while printing the message `led turned off`.
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
def main():
|
||||||
|
while True:
|
||||||
|
for led in leds:
|
||||||
|
if GPIO.input(sensorPin)==GPIO.HIGH:
|
||||||
|
GPIO.output(led, GPIO.HIGH)
|
||||||
|
sleep(.05)
|
||||||
|
GPIO.output(led, GPIO.LOW)
|
||||||
|
print ('led turned on >>>')
|
||||||
|
else :
|
||||||
|
GPIO.output(led, GPIO.LOW) # turn off led
|
||||||
|
print ('led turned off <<<')
|
||||||
|
```
|
||||||
|
|
||||||
|
While you can mathematically choose the brightness level, I found it easier to set the sleep timer between powering on and powering off. I set this after many tests of the amount of time needed to create a flickering candle effect.
|
||||||
|
|
||||||
|
Finally, you need some clean up to release your resources when the program is ended:
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
def destroy():
|
||||||
|
GPIO.cleanup() # Release GPIO resource
|
||||||
|
```
|
||||||
|
|
||||||
|
Now that everything has been defined to run, you can run your code. Start the program, run the setup, try your main, and if a KeyboardInterrupt is received, destroy and clean everything up.
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
if __name__ == '__main__': # Program entrance
|
||||||
|
print ('Program is starting...')
|
||||||
|
setup()
|
||||||
|
try:
|
||||||
|
main()
|
||||||
|
except KeyboardInterrupt: # Press ctrl-c to end the program.
|
||||||
|
destroy()
|
||||||
|
```
|
||||||
|
|
||||||
|
Now that you've created your program, the final result should look like this:
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
import RPi.GPIO as GPIO
|
||||||
|
import os
|
||||||
|
from time import sleep
|
||||||
|
|
||||||
|
ledPin1 = 12 # define ledPins
|
||||||
|
ledPin2 = 22
|
||||||
|
sensorPin = 11 # define sensorPin
|
||||||
|
leds = [ledPin1, ledPin2]
|
||||||
|
|
||||||
|
def setup():
|
||||||
|
GPIO.setmode(GPIO.BOARD) # use PHYSICAL GPIO Numbering
|
||||||
|
GPIO.setup(ledPin1, GPIO.OUT) # set ledPin to OUTPUT mode
|
||||||
|
GPIO.setup(ledPin2, GPIO.OUT) # set ledPin to OUTPUT mode
|
||||||
|
GPIO.setup(sensorPin, GPIO.IN) # set sensorPin to INPUT mode
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
while True:
|
||||||
|
for led in leds:
|
||||||
|
if GPIO.input(sensorPin)==GPIO.HIGH:
|
||||||
|
GPIO.output(led, GPIO.HIGH)
|
||||||
|
sleep(.05)
|
||||||
|
GPIO.output(led, GPIO.LOW)
|
||||||
|
print ('led turned on >>>')
|
||||||
|
else :
|
||||||
|
GPIO.output(led, GPIO.LOW) # turn off led
|
||||||
|
print ('led turned off <<<')
|
||||||
|
|
||||||
|
|
||||||
|
def destroy():
|
||||||
|
GPIO.cleanup() # Release GPIO resource
|
||||||
|
|
||||||
|
if __name__ == '__main__': # Program entrance
|
||||||
|
print ('Program is starting...')
|
||||||
|
setup()
|
||||||
|
try:
|
||||||
|
main()
|
||||||
|
except KeyboardInterrupt: # Press ctrl-c to end the program.
|
||||||
|
destroy()
|
||||||
|
```
|
||||||
|
|
||||||
|
When it runs, it should look similar to this. (Note: I was still testing with sleep time during this recording.)
|
||||||
|
|
||||||
|
### Time to bake that pumpkin
|
||||||
|
|
||||||
|
To start, I had a very large plastic pumpkin gifted by our family to my husband and me.
|
||||||
|
|
||||||
|
![A large, smiling orange jack o'lantern][18]
|
||||||
|
|
||||||
|
Jess Cherry CC BY-SA 4.0
|
||||||
|
|
||||||
|
Originally, it had a plug in the back with a bulb that was burnt out, which is what inspired this idea in the first place. I realized I'd have to make some modifications, starting with cutting a hole in the bottom using a drill and jab saw.
|
||||||
|
|
||||||
|
![A man drilling a hole in the bottom of a large plastic jack o'lantern][19]
|
||||||
|
|
||||||
|
Jess Cherry CC BY-SA 4.0
|
||||||
|
|
||||||
|
![A hole that takes up most of the bottom of the plastic jack o'lantern][20]
|
||||||
|
|
||||||
|
Jess Cherry CC BY-SA 4.0
|
||||||
|
|
||||||
|
Luckily, the pumpkin already had a hole in the back for the cord leading to the original light. I could stuff all the equipment inside the pumpkin, but I needed a way to hide the sensor.
|
||||||
|
|
||||||
|
First, I had to make a spot for the sensor to be wired externally to the pumpkin, so I drilled a hole by the stem:
|
||||||
|
|
||||||
|
![A small hole drilled in the brown stem of the jack o'lantern][21]
|
||||||
|
|
||||||
|
Jess Cherry CC BY-SA 4.0
|
||||||
|
|
||||||
|
Then I put all the wiring for the sensor through the hole, which ended up posing another issue: the sensor is big and weird-looking. I went looking for a decorative way to resolve this.
|
||||||
|
|
||||||
|
![The sensor hanging around the stem of the pumpkin, and a spool of ribbon][22]
|
||||||
|
|
||||||
|
Jess Cherry CC BY-SA 4.0
|
||||||
|
|
||||||
|
I did, in fact, make the scariest ribbon decoration (covered in hot glue gun mush) in all of humanity, but you won't notice the sensor.
|
||||||
|
|
||||||
|
![A large bow with orange, black, and patterned ribbon completely covers the sensor][23]
|
||||||
|
|
||||||
|
Jess Cherry CC BY-SA 4.0
|
||||||
|
|
||||||
|
Finally, I put the Pi and extension card in the pumpkin and cabeled the power through the back.
|
||||||
|
|
||||||
|
![The breadboard and cables fit inside the hole in the bottom of the jack o'lantern][24]
|
||||||
|
|
||||||
|
Jess Cherry CC BY-SA 4.0
|
||||||
|
|
||||||
|
With everything cabled, I was ready to VNC into my Pi and turn on the Python, then wait for something to move to test it out.
|
||||||
|
|
||||||
|
![VNC viewer with Python file running][25]
|
||||||
|
|
||||||
|
Jess Cherry CC BY-SA 4.0
|
||||||
|
|
||||||
|
![senseled.py running, showing led turned off switching to led turned on][26]
|
||||||
|
|
||||||
|
Jess Cherry CC BY-SA 4.0
|
||||||
|
|
||||||
|
### Post baking notes
|
||||||
|
|
||||||
|
This was a really long and very researched build. As I said in the introduction, this isn't a weekend project. I knew nothing about breadboards when I started, and it took me a while to recode and determine exactly what I wanted. There are some very granular details I did not include here. For example, the sensor has two knobs that define how far it can pick up motion and how long the sensor input needs to continue. While this was a fantastic thing to learn, I would definitely do a lot of research before pursuing this journey.
|
||||||
|
|
||||||
|
I did not get to one part of the project that I really wanted: the ability to connect to a Bluetooth device and make spooky noises. That said, playing with a Raspberry Pi is always fun to do, whether with home automation, weather tracking, or just silly decorations. I hope you enjoyed this walk-through and feel inspired to try something similar yourself.
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
via: https://opensource.com/article/21/10/halloween-raspberry-pi
|
||||||
|
|
||||||
|
作者:[Jessica Cherry][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/cherrybomb
|
||||||
|
[b]: https://github.com/lujun9972
|
||||||
|
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/pumpkins.jpg?itok=00mvIoJf (A vignette of green, orange, and yellow pumpkins in front of a brick wall)
|
||||||
|
[2]: https://opensource.com/sites/default/files/uploads/pumpkin_pi_1.png (Raspberry Pi computer board)
|
||||||
|
[3]: https://opensource.com/sites/default/files/uploads/pumpkin_pi_3.png (Cables and LEDs)
|
||||||
|
[4]: https://opensource.com/sites/default/files/uploads/pumpkin_pi_4.png (Project supplies)
|
||||||
|
[5]: https://www.raspberrypi.com/documentation/computers/getting-started.html#using-raspberry-pi-imager
|
||||||
|
[6]: https://opensource.com/sites/default/files/uploads/pumpkin_pi_5.png (Menu)
|
||||||
|
[7]: https://opensource.com/sites/default/files/uploads/pumpkin_pi_6.png (Menu)
|
||||||
|
[8]: https://opensource.com/sites/default/files/uploads/pumpkin_pi_7.png (Board and cable)
|
||||||
|
[9]: https://opensource.com/sites/default/files/uploads/pumpkin_pi_8.png (Breadboard)
|
||||||
|
[10]: https://opensource.com/sites/default/files/uploads/pumpkin_pi_9.png (Partially set-up breadboard)
|
||||||
|
[11]: https://opensource.com/sites/default/files/uploads/pumpkin_pi_11.png (Extension board)
|
||||||
|
[12]: https://opensource.com/sites/default/files/uploads/pumpkin_pi_12.png (Sensor)
|
||||||
|
[13]: https://opensource.com/sites/default/files/uploads/pumpkin_pi_13.png (Sensor with cables)
|
||||||
|
[14]: https://opensource.com/sites/default/files/uploads/pumpkin_pi15.png (Breadboard with sensor cables attached)
|
||||||
|
[15]: https://opensource.com/sites/default/files/uploads/pumpkin_pi_16.png (Light setup)
|
||||||
|
[16]: https://opensource.com/sites/default/files/uploads/pumpkinpi_bb.jpeg (Illustration of connections)
|
||||||
|
[17]: https://opensource.com/article/18/3/loop-better-deeper-look-iteration-python
|
||||||
|
[18]: https://opensource.com/sites/default/files/uploads/pumpkin_pi_18.png (the pumpkin)
|
||||||
|
[19]: https://opensource.com/sites/default/files/uploads/pumpkin_pi_19.png (Drilling)
|
||||||
|
[20]: https://opensource.com/sites/default/files/uploads/pumpkin_pi_20.png (Pumpkin hole)
|
||||||
|
[21]: https://opensource.com/sites/default/files/uploads/pumpkin_pi_21.png (Sensor hole)
|
||||||
|
[22]: https://opensource.com/sites/default/files/uploads/pumpkin_pi_24.png (The unhidden sensor)
|
||||||
|
[23]: https://opensource.com/sites/default/files/uploads/pumpkin_pi_25.png (Sensor disguise ribbons)
|
||||||
|
[24]: https://opensource.com/sites/default/files/uploads/pumpkin_pi_28.png (Enclosing the kit)
|
||||||
|
[25]: https://opensource.com/sites/default/files/uploads/pumpkin_pi_29.png (VNC viewer)
|
||||||
|
[26]: https://opensource.com/sites/default/files/uploads/pumpkin_pi_31.png (LED turns on)
|
@ -0,0 +1,77 @@
|
|||||||
|
[#]: subject: "5 lessons I learned about chaos engineering for Kubernetes"
|
||||||
|
[#]: via: "https://opensource.com/article/21/10/chaos-engineering-kubernetes-ebook"
|
||||||
|
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
|
||||||
|
[#]: collector: "lujun9972"
|
||||||
|
[#]: translator: " "
|
||||||
|
[#]: reviewer: " "
|
||||||
|
[#]: publisher: " "
|
||||||
|
[#]: url: " "
|
||||||
|
|
||||||
|
5 lessons I learned about chaos engineering for Kubernetes
|
||||||
|
======
|
||||||
|
To ensure that you're breaking things responsibly and intelligently,
|
||||||
|
download our new eBook about chaos engineering for Kubernetes.
|
||||||
|
![Scrabble letters spell out chaos for chaos engineering][1]
|
||||||
|
|
||||||
|
Kubernetes is a complex framework for a complex job. Managing several containers can be complicated, and managing hundreds and thousands of them is essentially just not humanly possible. Kubernetes makes highly available and highly scaled cloud applications a reality, and it usually does its job remarkably well. However, people don't tend to notice the days and months of success. Months and years of smooth operation aren't the things that result in phone calls at 2 AM. In IT, it's the failures that count. And unfortunately, failures don't run on a schedule.
|
||||||
|
|
||||||
|
[Jessica Cherry's][2] new eBook, **[Chaos engineering for Kubernetes][3]**, introduces several concepts about how system engineers can help test the robustness of the systems they've designed. Surprisingly, a big part of it is failure. Here are the top five lessons I've learned from Cherry's book.
|
||||||
|
|
||||||
|
### Intentional failure is part of success
|
||||||
|
|
||||||
|
It doesn't matter that you've done everything right. You've purchased bespoke hardware for the job, you've installed a stable distribution, purchased support, read the fine manuals, documented your process, automated recovery, made backups, and on and on. After all the prep work, there's only one thing you can be sure about: Something will go wrong eventually.
|
||||||
|
|
||||||
|
It's not morbid to think that way because it's just what happens in technological and mechanical systems. Things fail.
|
||||||
|
|
||||||
|
You can't stop things from failing, but you can _make_ them fail when it's convenient to you. Unfortunately, forcing a failure on your system doesn't "use up" all of your allotted failures for the year. Things will still fail unexpectedly, but by causing failure according to your own schedule, you ensure that you have the resources and knowledge you need to fix problems.
|
||||||
|
|
||||||
|
### Randomized failure is part of resiliency
|
||||||
|
|
||||||
|
You're not the only who needs to know how to handle failure. Your infrastructure needs to be able to withstand failure, too. While you can test some of this with scheduled failures, randomness helps ensure resiliency. After all, some failures will happen when you're not around to ensure that everything else still functions. Ideally, you want to develop the peace of mind that something could break without you ever knowing about it (but you will know about it eventually because you're monitoring your cluster. You are monitoring your cluster, right?).
|
||||||
|
|
||||||
|
### Resiliency needs to happen in many places
|
||||||
|
|
||||||
|
I'll never forget the first large-scale (200 users was large-scale for me, then) shared file server. It had an LVM pool of storage with plenty of space for additional hard drives, battery backup, a robust SAMBA back-end, an AMANDA-based backup routine, a fallback network, and easy admin access both locally and remotely. The server didn't need constant availability, so I had plenty of time to test it during the week, but it did require availability at specific times during the workday. It was well-used, and I was justly proud of it for several months.
|
||||||
|
|
||||||
|
And then, one week, my file server ran out of hard drive space. No problem—I'd built it to have expandable storage, so it would be a simple matter of walking up to the server, sliding in a new drive, and continuing about my day. Except for one small glitch: The hard drives weren't hot-swappable on the hardware I'd purchased. (Who knew there were rack servers without hot-swappable drive bays?) The whole system had to be shut down for me to add storage to it, and of course, it happened on a Friday afternoon, when everybody's work was being rendered.
|
||||||
|
|
||||||
|
Lesson learned: Resiliency isn't a fixed point in time. You don't design a system to be perfect at one specific moment; you design it so it can fail at any moment.
|
||||||
|
|
||||||
|
It's hard to detect the weak spots in your design unless you cause failure at unexpected times and in unexpected places.
|
||||||
|
|
||||||
|
### Chaos strengthens order
|
||||||
|
|
||||||
|
I used to think that rigorous testing was a luxury. I thought it was something big teams could afford to do because they surely had dedicated QA people sitting in labs tinkering and disassembling carbon copies of what's in production.
|
||||||
|
|
||||||
|
As I had the privilege of working on larger and larger teams, though, I found that more people only means there's a greater _potential_ for tests to happen. It never guarantees that tests are actually getting done.
|
||||||
|
|
||||||
|
Chaos engineering is a practice anyone can adopt. Talk to your department, assemble a team, form a plan. Set up monitoring, make your cluster operation transparent, invite questions and challenges. Get a plan for formalized chaos engineering because Chaos strains Order and ultimately can make it stronger.
|
||||||
|
|
||||||
|
### Kubernetes can be surprisingly fun
|
||||||
|
|
||||||
|
People sometimes ask me what I do with my Raspberry Pi Kubernetes cluster. Admittedly, I don't personally run any vital services on my little open hybrid cloud. But as it turns out, there's a lot of fun to be had with a miniature super-computer (well, it's super to me, anyway.). Looking at pretty Grafana dashboards and playing Doom with pods are both fun, but so is the configuration, the challenge of testing my cluster's performance after a node's been suddenly removed from the network, trying to see how many times an SD card can survive improper removal (so far a lot, thanks probably to ext4), configuring two containers to interact with one another, coming to grips with the logical structures of namespaces and pods, and so on.
|
||||||
|
|
||||||
|
At the end of the day, Kubernetes has given me my own cloud, and I frankly enjoy having that kind of power at my fingertips.
|
||||||
|
|
||||||
|
Chaos engineering gives you permission to be a little wanton. It encourages you to be methodically reckless. And in the end, you get a more resilient system.
|
||||||
|
|
||||||
|
### Download the ebook
|
||||||
|
|
||||||
|
Of course, you can't just try to aimlessly destroy your own computer and call it chaos engineering. Without discipline, documentation, and mitigation, it's just chaos. To ensure that you're breaking things responsibly and intelligently, download **[Chaos engineering for Kubernetes][3]**. And then let slip the monkeys of chaos!
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
via: https://opensource.com/article/21/10/chaos-engineering-kubernetes-ebook
|
||||||
|
|
||||||
|
作者:[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/brett-jordan-chaos-unsplash.jpg?itok=sApp5dVd (Scrabble letters spell out chaos for chaos engineering)
|
||||||
|
[2]: https://opensource.com/users/cherrybomb
|
||||||
|
[3]: https://opensource.com/downloads/chaos-engineering-kubernetes
|
116
sources/tech/20211029 A simple CSS trick for dark mode.md
Normal file
116
sources/tech/20211029 A simple CSS trick for dark mode.md
Normal file
@ -0,0 +1,116 @@
|
|||||||
|
[#]: subject: "A simple CSS trick for dark mode"
|
||||||
|
[#]: via: "https://opensource.com/article/21/10/dark-themes-websites"
|
||||||
|
[#]: author: "Ayush Sharma https://opensource.com/users/ayushsharma"
|
||||||
|
[#]: collector: "lujun9972"
|
||||||
|
[#]: translator: " "
|
||||||
|
[#]: reviewer: " "
|
||||||
|
[#]: publisher: " "
|
||||||
|
[#]: url: " "
|
||||||
|
|
||||||
|
A simple CSS trick for dark mode
|
||||||
|
======
|
||||||
|
The ability to let your website adjust to the user's theme of choice is
|
||||||
|
a great accessibility feature.
|
||||||
|
![Text editor on a browser, in blue][1]
|
||||||
|
|
||||||
|
You're likely already familiar with media queries. They're in widespread use for making websites responsive. The `width` and `height` properties contain the viewport's dimensions. You then use CSS to render different layouts at different dimensions.
|
||||||
|
|
||||||
|
The [prefers-color-scheme media query][2] works the same way. The user can configure their operating system to use a light or dark theme. `Prefers-color-scheme` contains that value. The value is either `light` or `dark`, though the W3C spec states that it might support future values like `sepia`. I specify different values of CSS variables for both modes and let the user's OS decide.
|
||||||
|
|
||||||
|
### The prefers-color-scheme media queries
|
||||||
|
|
||||||
|
The two variations of the `prefers-color-scheme` media query are:
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
/* Light mode */
|
||||||
|
@media (prefers-color-scheme: light) {
|
||||||
|
:root {
|
||||||
|
--body-bg: #FFFFFF;
|
||||||
|
--body-color: #000000;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Dark mode */
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
:root {
|
||||||
|
--body-bg: #000000;
|
||||||
|
--body-color: #FFFFFF;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
In the above CSS, `--body-bg` and `--body-color` are [CSS variables][3]. As you can see, they contain different values for both modes. In the light theme, I'm setting a white background with black text. In the dark theme, I'm setting black background with white text.
|
||||||
|
|
||||||
|
Since the [spec][2] says that W3C might introduce future values, it makes sense to convert this CSS into a boolean.
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
/* Light mode */
|
||||||
|
:root {
|
||||||
|
--body-bg: #FFFFFF;
|
||||||
|
--body-color: #000000;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Dark mode */
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
:root {
|
||||||
|
--body-bg: #000000;
|
||||||
|
--body-color: #FFFFFF;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
In the above code, I'm defining a light theme by default and converting it to the dark theme if the media query is `dark`. This way, any future values added to the media query will set the light theme by default.
|
||||||
|
|
||||||
|
### Using the CSS variables
|
||||||
|
|
||||||
|
Now that I have different values for different themes, I need to actually use them to style the page.
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
body {
|
||||||
|
background: var(--body-bg);
|
||||||
|
color: var(--body-color);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
The [var() syntax][3] is how CSS uses variables. In the above code, I'm saying set the `background` to the value of `--body-bg` and set the `color` to the value of `--body-color`. Note that the values of these variables are coming from the media query. Meaning that the background and foreground color changes based on the OS's setting!
|
||||||
|
|
||||||
|
This is the real power of the media query: Providing a consistent user experience from OS to the web page.
|
||||||
|
|
||||||
|
If you go to [findmymastodon.com][4] and switch your OS's theme, you'll see the transition from one theme to the other.
|
||||||
|
|
||||||
|
The [CSS Working Group][2] website also uses the same media queries. Change your OS theme, and the website switches themes to adjust.
|
||||||
|
|
||||||
|
### Conclusion
|
||||||
|
|
||||||
|
Notice that using `prefers-color-scheme` is no different from using a regular programming language. I define variables whose values change based on some logic. And those variables are then used for further operations.
|
||||||
|
|
||||||
|
The ability to let your website adjust to the user's theme of choice is a great accessibility feature. And it further blurs the line between desktop and web for the benefit of the user. The latest browser versions [support prefers-color-scheme][5], so you can begin experimenting today.
|
||||||
|
|
||||||
|
Happy coding.
|
||||||
|
|
||||||
|
* * *
|
||||||
|
|
||||||
|
_This article originally appeared on the [author's website][6] and is republished with permission._
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
via: https://opensource.com/article/21/10/dark-themes-websites
|
||||||
|
|
||||||
|
作者:[Ayush Sharma][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/ayushsharma
|
||||||
|
[b]: https://github.com/lujun9972
|
||||||
|
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/browser_blue_text_editor_web.png?itok=lcf-m6N7 (Text editor on a browser, in blue)
|
||||||
|
[2]: https://drafts.csswg.org/mediaqueries-5/#prefers-color-scheme
|
||||||
|
[3]: https://www.w3.org/TR/css-variables-1/
|
||||||
|
[4]: https://findmymastodon.com/
|
||||||
|
[5]: https://caniuse.com/prefers-color-scheme
|
||||||
|
[6]: https://ayushsharma.in/2021/10/creating-light-and-dark-themes-for-websites-correctly-using-prefers-color-scheme
|
@ -0,0 +1,145 @@
|
|||||||
|
[#]: subject: "Only 4 MB? How to Fix USB ‘Destroyed’ by Etcher and Rufus After Creating Live Linux USB"
|
||||||
|
[#]: via: "https://itsfoss.com/format-live-linux-usb/"
|
||||||
|
[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/"
|
||||||
|
[#]: collector: "lujun9972"
|
||||||
|
[#]: translator: " "
|
||||||
|
[#]: reviewer: " "
|
||||||
|
[#]: publisher: " "
|
||||||
|
[#]: url: " "
|
||||||
|
|
||||||
|
Only 4 MB? How to Fix USB ‘Destroyed’ by Etcher and Rufus After Creating Live Linux USB
|
||||||
|
======
|
||||||
|
|
||||||
|
Here’s the scenario. You used Etcher or Rufus tools to create a bootable, live Linux USB in Windows or perhaps in Linux.
|
||||||
|
|
||||||
|
You used it to install Linux and the purpose of the USB is accomplished. Now you want to format this USB and use it for the regular data transfer or storage.
|
||||||
|
|
||||||
|
You plug it in your Windows system and to your surprise, the disk capacity of the USB is just 4 MB.
|
||||||
|
|
||||||
|
![][1]
|
||||||
|
|
||||||
|
You try to format it and it probably won’t let you do that. Even if you manage to format it, the size of the USB is now shrunk to just 4 MB from the usual 8 GB, 16 GB or 32 GB.
|
||||||
|
|
||||||
|
Have you lost your USB? Not really. Your USB is not completely destroyed. You can still format it with a little trick and use it comfortably.
|
||||||
|
|
||||||
|
Let me show how to restore the bootable USB to a usable state in both Windows and Linux.
|
||||||
|
|
||||||
|
### Formatting the live Linux USB created by Rufus or Etcher [In Windows]
|
||||||
|
|
||||||
|
You see only 4 MB of disk space in Windows. Do you know why? Because while creating the live Linux USB, the tool creates a 4 MB of EFI partition in FAT 32 filesystem. The other partition(s) is in Linux’s Ext4 filesystem which is not recognized by Windows.
|
||||||
|
|
||||||
|
This is why your Windows system only sees the EFI partition of 4 MB and shows the USB size as 4 MB.
|
||||||
|
|
||||||
|
![Windows only see the EFI partition on the USB][2]
|
||||||
|
|
||||||
|
All in all, what you need to do is to delete all the partition on the USB disk, create a new NTFS or FAT32 partition from the free space you got from deleting the existing partitions. That’s it.
|
||||||
|
|
||||||
|
Let me show the steps in detail.
|
||||||
|
|
||||||
|
#### Step 1:
|
||||||
|
|
||||||
|
Go to the Windows menu and look for the Disk Management tool.
|
||||||
|
|
||||||
|
![Start disk management tool][3]
|
||||||
|
|
||||||
|
Start this tool and it will show all the disks present on your computer. This includes the plugged-in USB, of course.
|
||||||
|
|
||||||
|
_**This is very important to select the correct disk**_. Identify which one it is from the size of the USB disk or from the ‘Removable’ tag.
|
||||||
|
|
||||||
|
![][4]
|
||||||
|
|
||||||
|
#### Step 2:
|
||||||
|
|
||||||
|
The idea is to delete any existing partition present on the USB disk. The unallocated space cannot be deleted but that’s okay.
|
||||||
|
|
||||||
|
Right click on the partition and click **Delete Volume**.
|
||||||
|
|
||||||
|
![Delete partitions on the USB disk][5]
|
||||||
|
|
||||||
|
When asked for your confirmation, press Yes.
|
||||||
|
|
||||||
|
![Confirm deletion of partition][6]
|
||||||
|
|
||||||
|
Your aim is to have only a single block of unallocated space. When you see that, right click on it and click on “New Simple Volume” to create a partition.
|
||||||
|
|
||||||
|
![Create New Simple Volume \(partition\)][7]
|
||||||
|
|
||||||
|
The next steps are simple. Click on Next, select the entire available space, assign a letter to it, select the file system (FAT 32 or NTFS) and format it.
|
||||||
|
|
||||||
|
![Click Next][8]
|
||||||
|
|
||||||
|
![Use entire available space][9]
|
||||||
|
|
||||||
|
![Give it a drive letter][10]
|
||||||
|
|
||||||
|
![Use FAT 32 or NTFS, Name the USB if you want][11]
|
||||||
|
|
||||||
|
![Revise all the changes][12]
|
||||||
|
|
||||||
|
Once that is done, you’ll see that the USB has returned to normal state and you can start copy-pasting data to it.
|
||||||
|
|
||||||
|
![USB is back to normal state][13]
|
||||||
|
|
||||||
|
You can use your USB as before now.
|
||||||
|
|
||||||
|
These steps were for Windows. What if you use Linux?
|
||||||
|
|
||||||
|
### Formatting live Linux USB on Linux
|
||||||
|
|
||||||
|
I have noticed that live USB created by Etcher and such tools often create refuse to be formatted properly by the right click format option in the file manager.
|
||||||
|
|
||||||
|
As an alternative, you can do what you did in Windows: delete existing partitions and create a new partition with the entire free space.
|
||||||
|
|
||||||
|
Use the GNOME Disks tool here. It is already installed on Ubuntu and many other Linux distributions.
|
||||||
|
|
||||||
|
![Start disk app][14]
|
||||||
|
|
||||||
|
_**Again, make sure that you have selected the external USB disk here.**_
|
||||||
|
|
||||||
|
You’ll see various partitions on the USB disk. Try and format the disk from the menu above.
|
||||||
|
|
||||||
|
![Format disk][15]
|
||||||
|
|
||||||
|
**If that does not work, delete the partitions individually** one by one and then make the entire USB as free space.
|
||||||
|
|
||||||
|
When you have the entire free space created, click on the + sign to create a partition on it in NTFS or FAT32 filesystem.
|
||||||
|
|
||||||
|
![][16]
|
||||||
|
|
||||||
|
Create the partition with NTFS (or FAT 32), name it something appropriate and then you can enjoy the USB like it was before.
|
||||||
|
|
||||||
|
### Conclusion
|
||||||
|
|
||||||
|
Tools like Rufus and Etcher don’t really destroy your USB. This is how they function, by creating a different filesystem on the disk. But then the operating system doesn’t understand it properly.
|
||||||
|
|
||||||
|
The good thing is that it can be fixed with only a little effort. I hope you too were able to fix it. If not, share your issue with me and I’ll try to help.
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
via: https://itsfoss.com/format-live-linux-usb/
|
||||||
|
|
||||||
|
作者:[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://i2.wp.com/itsfoss.com/wp-content/uploads/2021/10/usb-drive-4mb-space-only.webp?resize=800%2C324&ssl=1
|
||||||
|
[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/10/mystery-behind-4-mb-linux-live-usb.webp?resize=800%2C400&ssl=1
|
||||||
|
[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/10/start-disk-management-tool-windows.webp?resize=800%2C694&ssl=1
|
||||||
|
[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/10/identify-usb-disk-in-windows.webp?resize=800%2C509&ssl=1
|
||||||
|
[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/10/delete-partitions-on-usb-disk.webp?resize=800%2C464&ssl=1
|
||||||
|
[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/10/confirm-deletion-of-partition.webp?resize=800%2C357&ssl=1
|
||||||
|
[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/10/Create-New-Partition.webp?resize=800%2C471&ssl=1
|
||||||
|
[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/10/creating-new-simple-volume-1.png?resize=731%2C590&ssl=1
|
||||||
|
[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/10/creating-new-simple-volume-2.png?resize=735%2C589&ssl=1
|
||||||
|
[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/10/creating-new-simple-volume-3.png?resize=732%2C590&ssl=1
|
||||||
|
[11]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/10/creating-new-simple-volume-4.png?resize=669%2C527&ssl=1
|
||||||
|
[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/10/creating-new-simple-volume-5.png?resize=670%2C524&ssl=1
|
||||||
|
[13]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/10/live-Linux-USB-formatted-successfully.webp?resize=800%2C571&ssl=1
|
||||||
|
[14]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/10/start-disk-app.webp?resize=791%2C256&ssl=1
|
||||||
|
[15]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/10/format-usb-in-disks-tool.webp?resize=800%2C434&ssl=1
|
||||||
|
[16]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/10/create-partition-on-usb.webp?resize=800%2C418&ssl=1
|
@ -0,0 +1,162 @@
|
|||||||
|
[#]: subject: "7 ways anyone can contribute to Open Practice Library"
|
||||||
|
[#]: via: "https://opensource.com/article/21/10/open-practice-library"
|
||||||
|
[#]: author: "Donna Benjamin https://opensource.com/users/kattekrab"
|
||||||
|
[#]: collector: "lujun9972"
|
||||||
|
[#]: translator: " "
|
||||||
|
[#]: reviewer: " "
|
||||||
|
[#]: publisher: " "
|
||||||
|
[#]: url: " "
|
||||||
|
|
||||||
|
7 ways anyone can contribute to Open Practice Library
|
||||||
|
======
|
||||||
|
Contributing to the Open Practice Library is a fun way to participate in
|
||||||
|
a global community of practitioners who are all willing to share their
|
||||||
|
knowledge and improve their own ways of working.
|
||||||
|
![Stack of books for reading][1]
|
||||||
|
|
||||||
|
The [Open Practice Library][2] is a community-driven collection of practices for teams to use in support of working together. A "practice" is a behavior or "trick" that teams use to improve how they achieve their goals. Sometimes those goals are technical, like programming and IT, but all teams can use help defining their practices. Whether you're a teacher, event planner, salesperson, or artist, the process is important. When you're a team, getting on the same page is vital, and that's what the Open Practice Library can help you do.
|
||||||
|
|
||||||
|
The Library draws on the experience of practitioners from a wide range of backgrounds. Some of the practices in the Library may feel familiar if you're an agile practitioner or UX researcher. As a sysadmin, site reliability engineer, or software developer, you may also recognize a few practices from your own toolkit.
|
||||||
|
|
||||||
|
To support cross-functional teams building their collaboration skills together, the Open Practice Library is open to all to use, study, share, and even contribute, regardless of their role or job function. Many people who use the Library are surprised to learn they can contribute to it! So, below I'll take a look at seven different ways you can contribute to the Open Practice Library and then explore three reasons why you might want to have a go.
|
||||||
|
|
||||||
|
### 1\. Add a comment.
|
||||||
|
|
||||||
|
Share your experience using the practice. Did it work for you? Would you change anything? Any tips for others using the practice? Login to the comment system and start a discussion with the community.
|
||||||
|
|
||||||
|
**How:** At the bottom of every practice page is a space for comments.
|
||||||
|
|
||||||
|
![Add a comment][3]
|
||||||
|
|
||||||
|
(Donna Benjamin, [CC BY-SA 4.0][4])
|
||||||
|
|
||||||
|
To join the conversation, you must sign up for an account on [Hyvor Talk][5].
|
||||||
|
|
||||||
|
### 2\. Spread the word.
|
||||||
|
|
||||||
|
Please help grow the Open Practice Library community by telling other people about it and inviting them to contribute too. Find the Library on [Twitter][6], [Instagram][7], and check out the [podcast][8].
|
||||||
|
|
||||||
|
### 3\. Add your favorite practice.
|
||||||
|
|
||||||
|
Are you a practitioner with a tried and true method that the Library hasn't yet covered? It'd be great to share that with the world. Note that the content gets licensed under a creative commons license to make sure it's open for all to use and share with others. Review the Library's [Editorial Style Guide][9] to learn more about how to write about a practice for the Library.
|
||||||
|
|
||||||
|
Ok, ready?
|
||||||
|
|
||||||
|
Select **Add a Practice** from the menu.
|
||||||
|
|
||||||
|
![Add a practice][10]
|
||||||
|
|
||||||
|
(Donna Benjamin, [CC BY-SA 4.0][4])
|
||||||
|
|
||||||
|
That takes you to the login page of the content management system (CMS). The Library uses the open source Netlify CMS for moderating contributions.
|
||||||
|
|
||||||
|
Select **Login with Netlify Identity**.
|
||||||
|
|
||||||
|
![Login with Netlify Identity][11]
|
||||||
|
|
||||||
|
(Donna Benjamin, [CC BY-SA 4.0][4])
|
||||||
|
|
||||||
|
Then click **Continue with GitHub** account.
|
||||||
|
|
||||||
|
![Continue with Github][12]
|
||||||
|
|
||||||
|
(Donna Benjamin, [CC BY-SA 4.0][4])
|
||||||
|
|
||||||
|
Next, log in with your GitHub details, or create an account (it's free).
|
||||||
|
|
||||||
|
![Log in with Github details][13]
|
||||||
|
|
||||||
|
(Donna Benjamin, [CC BY-SA 4.0][4])
|
||||||
|
|
||||||
|
Once logged in, select **New Practice**, which takes you to the form to add a practice to the collection.
|
||||||
|
|
||||||
|
![Select New Practice][14]
|
||||||
|
|
||||||
|
(Donna Benjamin, [CC BY-SA 4.0][4])
|
||||||
|
|
||||||
|
Once you've drafted the new practice, you also need to add your name and GitHub username to the CMS for display on the **Practice** page. Select **Author** from the **Quick add** menu, or choose **Author** from the **Collections** menu, and then select **New Author**.
|
||||||
|
|
||||||
|
![Select New Author][15]
|
||||||
|
|
||||||
|
(Donna Benjamin, [CC BY-SA 4.0][4])
|
||||||
|
|
||||||
|
### 4\. Add a helpful resource or link.
|
||||||
|
|
||||||
|
Click the **Improve this Practice** button and find the **links we love section**. Post the URL, add a description, and select the category (for example, Video, blog).
|
||||||
|
|
||||||
|
![Improve this Practice button][16]
|
||||||
|
|
||||||
|
(Donna Benjamin, [CC BY-SA 4.0][4])
|
||||||
|
|
||||||
|
You can search for the practice you want to improve, for example, "Affinity Mapping."
|
||||||
|
|
||||||
|
![Search for practice][17]
|
||||||
|
|
||||||
|
(Donna Benjamin, [CC BY-SA 4.0][4])
|
||||||
|
|
||||||
|
Then click on the practice name to open the edit page.
|
||||||
|
|
||||||
|
### 5\. See a typo?
|
||||||
|
|
||||||
|
Click the **Improve this Practice** button and go right ahead and fix it!
|
||||||
|
|
||||||
|
### 6\. Add an issue on GitHub.
|
||||||
|
|
||||||
|
See something that's not quite right? Have a suggestion for a feature? Let the community know.
|
||||||
|
|
||||||
|
**How:** Go to the [issues page][18] and log into GitHub to add a new issue.
|
||||||
|
|
||||||
|
### 7\. Help with the website code.
|
||||||
|
|
||||||
|
There's a backlog of issues in GitHub that list where help on the website is needed. If you want to roll up your sleeves and [help with fixing bugs][19] or developing new features—you can even contribute code.
|
||||||
|
|
||||||
|
### Wrap up
|
||||||
|
|
||||||
|
Why contribute? Here are three reasons for you to consider:
|
||||||
|
|
||||||
|
1. "**While we teach, we learn**" is an old Roman saying.
|
||||||
|
You deepen your own understanding of a practice you use by writing it down and sharing it with others. Do some research on the background of where the practice came from, help credit the original source, and find examples of its usage.
|
||||||
|
2. **Improve your writing skills**.
|
||||||
|
By following the editorial style guide, you are learning to adapt your natural writing style to fit specific criteria. This is a valuable and fundamental communication skill that you can apply in a range of contexts.
|
||||||
|
3. **Demonstrate leadership**
|
||||||
|
By sharing your knowledge and expertise with an open, global community, you can help others grow and learn from your depth of experience.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
[Contributing to the Open Practice Library][20] is a fun and easy way to participate in a global, open community of practitioners who are all willing to share their knowledge and trying to improve their own ways of working.
|
||||||
|
|
||||||
|
You don't need to be a master coder to contribute to open source. Jade Wang shares 8 ways you can...
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
via: https://opensource.com/article/21/10/open-practice-library
|
||||||
|
|
||||||
|
作者:[Donna Benjamin][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/kattekrab
|
||||||
|
[b]: https://github.com/lujun9972
|
||||||
|
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/books_read_list_stack_study.png?itok=GZxb9OAv (Stack of books for reading)
|
||||||
|
[2]: https://openpracticelibrary.com/learn
|
||||||
|
[3]: https://opensource.com/sites/default/files/uploads/1_add-comment.png (Add a comment)
|
||||||
|
[4]: https://creativecommons.org/licenses/by-sa/4.0/
|
||||||
|
[5]: https://talk.hyvor.com
|
||||||
|
[6]: https://twitter.com/practicelibrary
|
||||||
|
[7]: https://www.instagram.com/openpracticelibrary
|
||||||
|
[8]: https://podcasts.apple.com/us/podcast/open-practice-podcast/id1501715186
|
||||||
|
[9]: https://openpracticelibrary.com/page/editorial/
|
||||||
|
[10]: https://opensource.com/sites/default/files/uploads/2_add-practice.gif (Add a practice)
|
||||||
|
[11]: https://opensource.com/sites/default/files/uploads/2_login-netlify.png (Login with Netlify Identity)
|
||||||
|
[12]: https://opensource.com/sites/default/files/uploads/3_continue-github.png (Continue with Github)
|
||||||
|
[13]: https://opensource.com/sites/default/files/uploads/4_github_details.png (Log in with Github details)
|
||||||
|
[14]: https://opensource.com/sites/default/files/uploads/5_new-practice.gif (Select New Practice)
|
||||||
|
[15]: https://opensource.com/sites/default/files/uploads/6_select-new-author.gif (select New Author)
|
||||||
|
[16]: https://opensource.com/sites/default/files/styles/medium/public/uploads/7_improve-this-practice.png?itok=ypFLi0uu (Improve this Practice button)
|
||||||
|
[17]: https://opensource.com/sites/default/files/styles/medium/public/uploads/8_search-for-practice.png?itok=f81s25N8 (Search for practice)
|
||||||
|
[18]: https://github.com/openpracticelibrary/openpracticelibrary/issues/new
|
||||||
|
[19]: https://github.com/openpracticelibrary/openpracticelibrary/issues?q=is%3Aissue+is%3Aopen+label%3ABug
|
||||||
|
[20]: https://openpracticelibrary.com/page/contribution-guide
|
@ -0,0 +1,162 @@
|
|||||||
|
[#]: subject: "Best DAW (Digital Audio Workstation) Available for Linux Desktops"
|
||||||
|
[#]: via: "https://itsfoss.com/best-daw-linux/"
|
||||||
|
[#]: author: "Ankush Das https://itsfoss.com/author/ankush/"
|
||||||
|
[#]: collector: "lujun9972"
|
||||||
|
[#]: translator: " "
|
||||||
|
[#]: reviewer: " "
|
||||||
|
[#]: publisher: " "
|
||||||
|
[#]: url: " "
|
||||||
|
|
||||||
|
Best DAW (Digital Audio Workstation) Available for Linux Desktops
|
||||||
|
======
|
||||||
|
|
||||||
|
A Digital Audio Workstation (DAW) lets you record, mix, and make music. For commercial usage, there are several mainstream options to consider, which are often regarded as industry-standard.
|
||||||
|
|
||||||
|
Full-fledged music DAWs like Steinberg’s Nuendo/Cubase, ProTools, Ableton Live, and FL Studio are the most popular (and expensive) solutions. However, they are not available for Linux.
|
||||||
|
|
||||||
|
Hence, when it comes to Linux, you will have to make a different set of choices as per the available options. And, here, I aim to help you point out the best music DAWs for Linux.
|
||||||
|
|
||||||
|
### Things to Keep in Mind Before Using a DAW for Linux
|
||||||
|
|
||||||
|
Even though you can achieve the same result as you would in a Windows/macOS system, there are a few pointers that you should know before choosing to use a DAW for Linux.
|
||||||
|
|
||||||
|
If you are a professional and have used Linux, you may be already aware of them. But, for new Linux users, this could help you make a decision:
|
||||||
|
|
||||||
|
* Many audio interfaces do not officially support Linux. So, you may want to check the compatibility and the audio setup process before starting.
|
||||||
|
* Popular audio plugins may not work directly. You will have to look for alternatives or try using Wine (which is a time-consuming process).
|
||||||
|
* Plug and play may not be the case. Manual setup is needed for a variety of tasks
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Overall, there are some prerequisites when it comes to using a DAW in Linux. It may not be as simple as installing it and getting started making music. So, you need to be aware of these before choosing Linux as your preferred platform for a DAW.
|
||||||
|
|
||||||
|
Note that there are several [audio editors available for Linux][1], but not all of them can be used as a full-fledged DAW.
|
||||||
|
|
||||||
|
Now that you know the caveats, let me mention the best Linux DAWs available.
|
||||||
|
|
||||||
|
Non-FOSS alert!
|
||||||
|
|
||||||
|
Some applications mentioned here are not open source. They are listed here because they are available on Linux and the article’s focus is on Linux.
|
||||||
|
|
||||||
|
### Top Linux DAWs
|
||||||
|
|
||||||
|
While there could be multiple DAWs available for Linux, to make sure that you get the best hardware/software compatibility along with an easy-to-use interface, we have limited our list to popular options.
|
||||||
|
|
||||||
|
#### 1\. Ardour
|
||||||
|
|
||||||
|
![][2]
|
||||||
|
|
||||||
|
Ardour is the most popular open-source DAW available for Linux. It is also available for Windows and macOS.
|
||||||
|
|
||||||
|
It is a suitable option for musicians, audio engineers, and composers. You get all the essential abilities to edit a score, and record/mix a song.
|
||||||
|
|
||||||
|
It comes with several plugin support out of the box. But, you need to manually add them to the mixer by adding them from the plugin manager. Also, you can choose to add external VST3 plugins by specifying the path for them. Ardour also supports a video timeline if you are looking to extract audio from it or sync.
|
||||||
|
|
||||||
|
##### Installing Ardour in Linux
|
||||||
|
|
||||||
|
Unlike any other premium DAWs, you do not need to pay a hefty price to get access to it. All you need to do is get a subscription of as low as $1/month and you can continue access to the program and its updates as long as your subscription is active.
|
||||||
|
|
||||||
|
If you are not interested in a subscription, you can choose to opt for one-time payments that should give you access to minor updates along with the next major version (depending on the amount you pay).
|
||||||
|
|
||||||
|
The best thing—you also get access to its development (or nightly) builds if you are fond of testing upcoming features and improvements.
|
||||||
|
|
||||||
|
For Linux distributions, it provides a .run file which you can easily start from the terminal.
|
||||||
|
|
||||||
|
[Ardour][3]
|
||||||
|
|
||||||
|
### 2\. LMMS
|
||||||
|
|
||||||
|
![][4]
|
||||||
|
|
||||||
|
LMMS is a free and open-source DAW available for Linux and other platforms.
|
||||||
|
|
||||||
|
When compared to some other DAWs, LMMS might fall short on the specialties needed by a professional.
|
||||||
|
|
||||||
|
However, it should offer some features if you are starting out to create music, or need something without needing to purchase/subscribe to anything. In other words, it is a suitable song editor DAW.
|
||||||
|
|
||||||
|
If you are coming from another DAW on another platform, the user interface may not be comfortable to get acquainted with. But, it is easy to use when you get used to it.
|
||||||
|
|
||||||
|
It also supports piano notes labels to help you with your music-making experience.
|
||||||
|
|
||||||
|
##### Installing LMMS in Linux
|
||||||
|
|
||||||
|
You get the option to download an AppImage file to work on any Linux distribution of your choice. It is rather easy to configure, so you only need to specify a working directory to get started.
|
||||||
|
|
||||||
|
[LMMS][5]
|
||||||
|
|
||||||
|
### 3\. Bitwig Studio
|
||||||
|
|
||||||
|
![][6]
|
||||||
|
|
||||||
|
Bitwig Studio is one of the popular mainstream music DAWs that also supports Linux. When compared to other DAWs in this list, Bitwig offers better cross-platform support and hardware integration.
|
||||||
|
|
||||||
|
Even though you may stick to Linux for music production, having cross-platform support to carry on your work where you left is an important criterion for some as well.
|
||||||
|
|
||||||
|
Bitwig includes a variety of creative tools to manipulate audio files and signals. So, it is perfectly suitable for a professional requirement.
|
||||||
|
|
||||||
|
### Installing Bitwig Studio in Linux
|
||||||
|
|
||||||
|
It offers a traditional DEB package for installation. You can use it for free in a “Demo mode” which does not let you save and export anything. Bitwig Studio is also available as a [Flatpak][7] on [Flathub][8].
|
||||||
|
|
||||||
|
To unlock all the features, you need to purchase it for **$399**.
|
||||||
|
|
||||||
|
[Bitwig Studio][9]
|
||||||
|
|
||||||
|
### 4\. REAPER
|
||||||
|
|
||||||
|
![][10]
|
||||||
|
|
||||||
|
Reaper is an affordable DAW available for Linux. It offers a simple user interface with all the essential features.
|
||||||
|
|
||||||
|
It may not offer many out-of-the-box plugins and functionalities compared to Bitwig Studio, but it should be good enough for most of the usual needs like modulation, automation, using VST plugins, and more.
|
||||||
|
|
||||||
|
Even though I haven’t personally used it, Reaper claims that it is highly customizable and offers good compatibility with a variety of hardware.
|
||||||
|
|
||||||
|
### Installing Reaper in Linux
|
||||||
|
|
||||||
|
Unlike other options, Reaper offers a tar archived package that you need to extract and install. It includes a script file. So, once you extract it, open the terminal in that folder or navigate to the folder in the terminal and then execute the script with the following command
|
||||||
|
|
||||||
|
```
|
||||||
|
./install-reaper.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
When you install it, the script generates another script to let you uninstall as well. So, make sure to carefully choose the folder when installing and make sure you can find it when required.
|
||||||
|
|
||||||
|
You can use it for free without any limitations for up to 60 days before you need to purchase it. So, I’d say that is a pretty good thing if you want to thoroughly test things before purchasing a DAW.
|
||||||
|
|
||||||
|
The cost for personal use is **$60** and if you need it for commercial use, it will cost you **$225**.
|
||||||
|
|
||||||
|
[Reaper][11]
|
||||||
|
|
||||||
|
### Wrapping Up
|
||||||
|
|
||||||
|
Unfortunately, you will not find many Digital Audio Workstation options available for Linux. You can try running some of the popular music DAWs using Wine, but I’m not sure of the success rate.
|
||||||
|
|
||||||
|
In either case, the ones mentioned here should be more than enough for the majority of users.
|
||||||
|
|
||||||
|
What DAW do you prefer for music production? Let me know your thoughts in the comments below.
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
via: https://itsfoss.com/best-daw-linux/
|
||||||
|
|
||||||
|
作者:[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/best-audio-editors-linux/
|
||||||
|
[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/09/ardour-daw.png?resize=800%2C476&ssl=1
|
||||||
|
[3]: https://ardour.org/
|
||||||
|
[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/09/lmms-daw.png?resize=800%2C476&ssl=1
|
||||||
|
[5]: https://lmms.io/lsp/
|
||||||
|
[6]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/10/bitwig-studio-linux.png?resize=800%2C457&ssl=1
|
||||||
|
[7]: https://itsfoss.com/what-is-flatpak/
|
||||||
|
[8]: https://flathub.org/apps/details/com.bitwig.BitwigStudio
|
||||||
|
[9]: https://www.bitwig.com/
|
||||||
|
[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/10/reaper-linux.png?resize=800%2C614&ssl=1
|
||||||
|
[11]: https://www.reaper.fm
|
@ -0,0 +1,95 @@
|
|||||||
|
[#]: subject: "Annotator: Open-Source App for Linux to Easily Add Essential Annotations to Your Images"
|
||||||
|
[#]: via: "https://itsfoss.com/annotator/"
|
||||||
|
[#]: author: "Ankush Das https://itsfoss.com/author/ankush/"
|
||||||
|
[#]: collector: "lujun9972"
|
||||||
|
[#]: translator: "geekpi"
|
||||||
|
[#]: reviewer: " "
|
||||||
|
[#]: publisher: " "
|
||||||
|
[#]: url: " "
|
||||||
|
|
||||||
|
Annotator:Linux 下可轻松为你的图片添加基本注释的开源应用
|
||||||
|
======
|
||||||
|
|
||||||
|
_**简介:**_ 一个令人兴奋和有用的注释工具,为 Linux 系统提供额外的功能。
|
||||||
|
|
||||||
|
说到图像处理和编辑,有很多工具可用。然而,像 GIMP 这样的选择不一定能解决所有问题。
|
||||||
|
|
||||||
|
是的,GIMP 为初学者和高级用户提供了大量的功能,但要学习一些东西并对任何你想要的图像应用视觉增强功能可能很费时。
|
||||||
|
|
||||||
|
Annotator 是一个令人印象深刻的开源工具,可以让你点几下就能做很多事情。
|
||||||
|
|
||||||
|
### Annotator:开源图像注释工具
|
||||||
|
|
||||||
|
![][1]
|
||||||
|
|
||||||
|
Annotator 让你快速添加形状、文本和其他视觉元素。这对各种使用情况都很有用。
|
||||||
|
|
||||||
|
这个工具很容易使用,提供了一个简单的用户界面。而且,你还可以得到各种功能来增强你想要的图像。
|
||||||
|
|
||||||
|
### Annotator 的功能
|
||||||
|
|
||||||
|
![Adding icons to images][2]
|
||||||
|
|
||||||
|
不仅仅限于为图片增强,你还可以通过 Annotator 获得一些其他功能。其中的一些主要功能是:
|
||||||
|
|
||||||
|
* 能够添加文本
|
||||||
|
* 自定义文本的颜色,调整大小,调整高亮的颜色等。
|
||||||
|
* 使用放大镜工具来关注图像中的某个特定点
|
||||||
|
* 调整放大镜以改变角度和大小
|
||||||
|
* 添加视觉图标来表达一些东西
|
||||||
|
* 使用铅笔来书写,这对触控板用户很有用
|
||||||
|
* 模糊工具来模糊重要或不必要的细节
|
||||||
|
* 计数器图标来突出图像中重要的任何种类的顺序
|
||||||
|
* 支持多种字体
|
||||||
|
* 调整形状和文本的边界宽度和线条
|
||||||
|
* 可用各种形状,如箭头、圆圈和星星
|
||||||
|
* 能够调整图像的大小和裁剪图像
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
![][3]
|
||||||
|
|
||||||
|
### 在 Linux 中安装 Annotator
|
||||||
|
|
||||||
|
基本上,Annotator 可以在 elementaryOS 的应用中心找到。但是,幸运的是,它是一个 Flatpak 包,所以你可以在任何 Linux 发行版上安装它。
|
||||||
|
|
||||||
|
你所需要做的就是前往应用中心商店的链接,然后使用软件安装程序下载/打开 **Flatpak ref** 文件。如果你需要帮助,我们的 [Flatpak 指南][4]中有更多相关信息。
|
||||||
|
|
||||||
|
[Annotator][5]
|
||||||
|
|
||||||
|
要从源代码构建或探索更多关于它的信息,你可以查看它的 [GitHub 页面][6]。
|
||||||
|
|
||||||
|
### 关于使用 Annotator 的想法
|
||||||
|
|
||||||
|
我发现它对我的工作很有用,因为我们每天都需要处理各种截图。而且,描述性越强,图片就越能让我们的读者理解。
|
||||||
|
|
||||||
|
通常情况下,我使用 Flameshot 作为我的截图工具,并通过它添加可用的注释。还有其他[可用于 Linux 的截图工具][7],但我更喜欢 Flameshot 的快速注释功能。
|
||||||
|
|
||||||
|
然而,你不能使用 Flameshot 或其他任何截图工具来为现有的图片添加注释。
|
||||||
|
|
||||||
|
因此,Annotator 在编辑现有的截图或任何其他所需的图像时就显得非常方便。
|
||||||
|
|
||||||
|
在我短暂的使用过程中,它的所有功能都运行良好,但我希望可以编辑和调整文字的大小,使之更加直观。除此以外,我没有任何抱怨。
|
||||||
|
|
||||||
|
如果你需要为你的系统上的图像添加高亮/注释,我建议你试一试。请在下面的评论中告诉我你的想法。
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
via: https://itsfoss.com/annotator/
|
||||||
|
|
||||||
|
作者:[Ankush Das][a]
|
||||||
|
选题:[lujun9972][b]
|
||||||
|
译者:[geekpi](https://github.com/geekpi)
|
||||||
|
校对:[校对者ID](https://github.com/校对者ID)
|
||||||
|
|
||||||
|
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||||
|
|
||||||
|
[a]: https://itsfoss.com/author/ankush/
|
||||||
|
[b]: https://github.com/lujun9972
|
||||||
|
[1]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/10/annotator.png?resize=800%2C573&ssl=1
|
||||||
|
[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/10/annotator-screenshot.png?resize=800%2C410&ssl=1
|
||||||
|
[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/10/annotator-resize.png?resize=800%2C490&ssl=1
|
||||||
|
[4]: https://itsfoss.com/flatpak-guide/
|
||||||
|
[5]: https://appcenter.elementary.io/com.github.phase1geo.annotator/
|
||||||
|
[6]: https://github.com/phase1geo/Annotator
|
||||||
|
[7]: https://itsfoss.com/take-screenshot-linux/
|
Loading…
Reference in New Issue
Block a user