mirror of
https://github.com/LCTT/TranslateProject.git
synced 2024-12-26 21:30:55 +08:00
Merge remote-tracking branch 'LCTT/master'
This commit is contained in:
commit
b9f2414f6b
@ -1,60 +1,63 @@
|
|||||||
[#]: collector: (lujun9972)
|
[#]: collector: (lujun9972)
|
||||||
[#]: translator: (geekpi)
|
[#]: translator: (geekpi)
|
||||||
[#]: reviewer: ( )
|
[#]: reviewer: (wxy)
|
||||||
[#]: publisher: ( )
|
[#]: publisher: (wxy)
|
||||||
[#]: url: ( )
|
[#]: url: (https://linux.cn/article-11944-1.html)
|
||||||
[#]: subject: (How to use byobu to multiplex SSH sessions)
|
[#]: subject: (How to use byobu to multiplex SSH sessions)
|
||||||
[#]: via: (https://opensource.com/article/20/2/byobu-ssh)
|
[#]: via: (https://opensource.com/article/20/2/byobu-ssh)
|
||||||
[#]: author: (Ben Nuttall https://opensource.com/users/bennuttall)
|
[#]: author: (Ben Nuttall https://opensource.com/users/bennuttall)
|
||||||
|
|
||||||
如何使用 byobu 复用 SSH 会话
|
如何使用 byobu 复用 SSH 会话
|
||||||
======
|
======
|
||||||
Byobu 能让你在保持会话活跃的情况下维护多个终端窗口、通过 SSH 连接、断开、重连以及共享访问。
|
|
||||||
|
> Byobu 能让你在保持会话活跃的情况下维护多个终端窗口,通过 SSH 连接、断开、重连以及共享访问。
|
||||||
|
|
||||||
![Person drinking a hat drink at the computer][1]
|
![Person drinking a hat drink at the computer][1]
|
||||||
|
|
||||||
[Byobu][2] 是基于文本的窗口管理器和终端多路复用器。它类似于 [GNU Screen][3],但更现代,更直观。它还适用于大多数 Linux、BSD 和 Mac 发行版。
|
[Byobu][2] 是基于文本的窗口管理器和终端多路复用器。它类似于 [GNU Screen][3],但更现代、更直观。它还适用于大多数 Linux、BSD 和 Mac 发行版。
|
||||||
|
|
||||||
Byobu 能让你在保持会话活跃的情况下维护多个终端窗口、通过 SSH (secure shell)连接、断开、重连,甚至让其他人访问。
|
Byobu 能让你在保持会话活跃的情况下维护多个终端窗口、通过 SSH(secure shell)连接、断开、重连,甚至让其他人访问。
|
||||||
|
|
||||||
比如,你 SSH 进入树莓派或服务器,并运行(比如) **sudo apt update && sudo apt upgrade**,然后你在它运行的时候失去了互联网连接,你的命令会丢失无效。然而,如果你首先启动 byobu 会话,那么它会继续运行,在你重连后,你会发现它仍在继续运行。
|
比如,你 SSH 进入树莓派或服务器,并运行(比如) `sudo apt update && sudo apt upgrade`,然后你在它运行的时候失去了互联网连接,你的命令会丢失无效。然而,如果你首先启动 byobu 会话,那么它会继续运行,在你重连后,你会发现它仍在继续运行。
|
||||||
|
|
||||||
![The byobu logo is a fun play on screens.][4]
|
![The byobu logo is a fun play on screens.][4]
|
||||||
|
|
||||||
Byobu 的日语术语是指装饰性多面板屏风,可作为折叠式隔断,我认为这很合适。
|
Byobu 名称来自于日语的装饰性多面板屏风,它可作为折叠式隔断,我认为这很合适。
|
||||||
|
|
||||||
要在 Debian/Raspbian/Ubuntu 上安装 byobu:
|
要在 Debian/Raspbian/Ubuntu 上安装 byobu:
|
||||||
|
|
||||||
**sudo apt install byobu**
|
```
|
||||||
|
sudo apt install byobu
|
||||||
|
```
|
||||||
|
|
||||||
接着启用它
|
接着启用它:
|
||||||
|
|
||||||
**byobu-enable**
|
```
|
||||||
|
byobu-enable
|
||||||
|
```
|
||||||
|
|
||||||
现在,请退出 SSH 会话并重新登录,你将会在 byobu 会话中登录。运行类似 **sudo apt update** 命令并关闭窗口(或输入转义序列([**Enter**+**~**+**.**][5])并重新登录。你将看到更新在你离开后还在运行。
|
现在,请退出 SSH 会话并重新登录,你将会在 byobu 会话中登录。运行类似 `sudo apt update` 命令并关闭窗口(或输入转义序列([Enter + ~ + .][5])并重新登录。你将看到更新命令在你离开后还在运行。
|
||||||
|
|
||||||
有_很多_我不常使用的功能。我通常使用的是:
|
有*很多*我不常使用的功能。我通常使用的是:
|
||||||
|
|
||||||
* **F2** – 新窗口
|
|
||||||
* **F3/F4** – 在窗口间导航
|
|
||||||
* **Ctrl**+**F2** – 垂直拆分窗格
|
|
||||||
* **Shift**+**F2** – 水平拆分窗格
|
|
||||||
* **Shift**+**左箭头/Shift**+**右箭头** – 在拆分窗格间导航
|
|
||||||
* **Shift**+**F11** – 放大(或缩小)拆分窗格
|
|
||||||
|
|
||||||
|
* `F2` – 新窗口
|
||||||
|
* `F3/F4` – 在窗口间导航
|
||||||
|
* `Ctrl`+`F2` – 垂直拆分窗格
|
||||||
|
* `Shift`+`F2` – 水平拆分窗格
|
||||||
|
* `Shift`+`左箭头/Shift`+`右箭头` – 在拆分窗格间导航
|
||||||
|
* `Shift`+`F11` – 放大(或缩小)拆分窗格
|
||||||
|
|
||||||
### 我们如何使用 byobu
|
### 我们如何使用 byobu
|
||||||
|
|
||||||
Byobu 对于 [piwheels][6](一个用于树莓派的方便的,预编译 Python 包)的维护很方便。我门水平拆分了窗格,在上半部分显示了 piwheels 监视器,在下半部分实时显示了 syslog 条目。接着,如果我们想要做其他事情,我们可以切换到另外一个窗口。当我们进行协作调查时,这特别方便,因为当我在 IRC 中聊天时,我可以看到我的同事 Dave 输入了什么(并纠正他的错字)。
|
Byobu 对于维护 [piwheels][6](一个用于树莓派的方便的,预编译 Python 包)很好用。我水平拆分了窗格,在上半部分显示了 piwheels 监视器,在下半部分实时显示了 syslog 条目。接着,如果我们想要做其他事情,我们可以切换到另外一个窗口。当我们进行协作分析时,这特别方便,因为当我在 IRC 中聊天时,我可以看到我的同事 Dave 输入了什么(并纠正他的错字)。
|
||||||
|
|
||||||
我在家庭和办公服务器上启用了 byobu,因此,当我登录到任何一台计算机时,一切都与我离开时一样。它正在运行多个作业、在特定目录中保留一个窗口,以另一个用户身份运行进程等。
|
我在家庭和办公服务器上启用了 byobu,因此,当我登录到任何一台计算机时,一切都与我离开时一样。它正在运行多个作业、在特定目录中保留一个窗口,以另一个用户身份运行进程等。
|
||||||
|
|
||||||
![byobu screenshot][7]
|
![byobu screenshot][7]
|
||||||
|
|
||||||
Byobu 也很方便用于在树莓派上进行开发。你可以在桌面上启动它,运行命令,然后 SSH 进入,并连接到该命令运行所在的会话。请注意,启用 byobu 不会更改终端启动器的功能。只需运行 **byobu** 即可启动它。
|
Byobu 对于在树莓派上进行开发也很方便。你可以在桌面上启动它,运行命令,然后 SSH 进入,并连接到该命令运行所在的会话。请注意,启用 byobu 不会更改终端启动器的功能。只需运行 `byobu` 即可启动它。
|
||||||
|
|
||||||
* * *
|
本文最初发表在 Ben Nuttall 的 [Tooling blog][8] 中,并获许重用。
|
||||||
|
|
||||||
_本文最初发表在 Ben Nuttall 的 [Tooling blog][8] 中,并获许重用_
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
@ -63,7 +66,7 @@ via: https://opensource.com/article/20/2/byobu-ssh
|
|||||||
作者:[Ben Nuttall][a]
|
作者:[Ben Nuttall][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/) 荣誉推出
|
||||||
|
|
@ -36,6 +36,8 @@
|
|||||||
|
|
||||||
这是许多数据科学家遇到的常见情况。示例数据是 [Anscombe 的四重奏][6]的第一组,如下表所示。这是一组人工构建的数据,当用直线拟合时会给出相同的结果,但是它们的曲线非常不同。数据文件是一个文本文件,以制表符作为列分隔符,开头几行作为标题。此任务将仅使用第一组(即前两列)。
|
这是许多数据科学家遇到的常见情况。示例数据是 [Anscombe 的四重奏][6]的第一组,如下表所示。这是一组人工构建的数据,当用直线拟合时会给出相同的结果,但是它们的曲线非常不同。数据文件是一个文本文件,以制表符作为列分隔符,开头几行作为标题。此任务将仅使用第一组(即前两列)。
|
||||||
|
|
||||||
|
![](https://img.linux.net.cn/data/attachment/album/202002/29/122805h3yrs1dkrgysssxk.png)
|
||||||
|
|
||||||
### Python 方式
|
### Python 方式
|
||||||
|
|
||||||
[Python][7] 是一种通用编程语言,是当今最流行的语言之一(依据 [TIOBE 指数][8]、[RedMonk 编程语言排名][9]、[编程语言流行指数][10]、[GitHub Octoverse 状态][11]和其他来源的调查结果)。它是一种[解释型语言][12];因此,源代码由执行该指令的程序读取和评估。它有一个全面的[标准库][13]并且总体上非常好用(我对这最后一句话没有证据;这只是我的拙见)。
|
[Python][7] 是一种通用编程语言,是当今最流行的语言之一(依据 [TIOBE 指数][8]、[RedMonk 编程语言排名][9]、[编程语言流行指数][10]、[GitHub Octoverse 状态][11]和其他来源的调查结果)。它是一种[解释型语言][12];因此,源代码由执行该指令的程序读取和评估。它有一个全面的[标准库][13]并且总体上非常好用(我对这最后一句话没有证据;这只是我的拙见)。
|
||||||
@ -235,7 +237,7 @@ sudo dnf install octave
|
|||||||
|
|
||||||
#### 代码注释
|
#### 代码注释
|
||||||
|
|
||||||
在 Octave 中,你可以用百分比符号(``%`)为代码添加注释,如果不需要与 MATLAB 兼容,你也可以使用 `#`。使用 `#` 的选项允许你编写像 Python 示例一样的特殊注释行,以便直接在命令行上执行脚本。
|
在 Octave 中,你可以用百分比符号(`%`)为代码添加注释,如果不需要与 MATLAB 兼容,你也可以使用 `#`。使用 `#` 的选项允许你编写像 Python 示例一样的特殊注释行,以便直接在命令行上执行脚本。
|
||||||
|
|
||||||
#### 必要的库
|
#### 必要的库
|
||||||
|
|
||||||
|
@ -0,0 +1,91 @@
|
|||||||
|
[#]: collector: (lujun9972)
|
||||||
|
[#]: translator: ( )
|
||||||
|
[#]: reviewer: ( )
|
||||||
|
[#]: publisher: ( )
|
||||||
|
[#]: url: ( )
|
||||||
|
[#]: subject: (Remember Unity8 from Ubuntu? UBports is Renaming it to Lomiri)
|
||||||
|
[#]: via: (https://itsfoss.com/unity8-lomiri/)
|
||||||
|
[#]: author: (John Paul https://itsfoss.com/author/john/)
|
||||||
|
|
||||||
|
Remember Unity8 from Ubuntu? UBports is Renaming it to Lomiri
|
||||||
|
======
|
||||||
|
|
||||||
|
Ever since Ubuntu abandoned the Unity project, UBports continued the maintenance and development of Unity. On February 27th 2020, [UBports][1] announced that they are giving Unity8 a new branding in the form of Lomiri.
|
||||||
|
|
||||||
|
### Unity8 is now Lomiri
|
||||||
|
|
||||||
|
![Unity8 in action | Image Credit: UBports][2]
|
||||||
|
|
||||||
|
[UBports announced][3] that the Unity8 desktop environment would be renamed as Lomiri. They gave three reasons for this fairly drastic announcement.
|
||||||
|
|
||||||
|
First, they want to avoid confusion with the [Unity game engine][4]. Quite a few people confused the two. UBports noted that they are frequently receiving questions regarding “how to import 3D models and meshes into our shell”. When you search “Unity” in your favorite search engine, most of the top links are for the game engine.
|
||||||
|
|
||||||
|
The second reason for the name change has to do with the new effort to package Unity8 for Debian. Unfortunately, many of the Unity8’s dependencies have Ubuntu in the name, for example, _**ubuntu-ui-toolkit**_. Debian packagers warned that packages that have Ubuntu in the name may not be accepted into [Debian][5].
|
||||||
|
|
||||||
|
Finally, UBports said the name change would improve verbal communications. Saying Unity8 repeatedly can be a mouthful. People would not have to worry about confusing “users of Ubuntu Unity and Unity (the game engine)”.
|
||||||
|
|
||||||
|
UBports went on to stress that the name change was not “triggered by any action from Canonical or the Ubuntu community, legal or otherwise”.
|
||||||
|
|
||||||
|
They noted that this name change was the perfect time for them to switch to [GitHub alternative GitLab][6] for their development.
|
||||||
|
|
||||||
|
Interestingly, the announcement did not explain how they picked Lomiri as the new name. All they said is that “We went through many different names before settling on Lomiri. All of them had problems with pronunciation, availability, or other related issues.”
|
||||||
|
|
||||||
|
UBports noted that most Ubuntu Touch users would be unaffected by the name change. Developers and power users might notice some changes, but UBports “will strive to maintain backwards compatibility within Ubuntu Touch for the foreseeable future”.
|
||||||
|
|
||||||
|
### What Exactly is Being Renamed?
|
||||||
|
|
||||||
|
![][7]
|
||||||
|
|
||||||
|
According to the announcement, packages that have either Ubuntu or Unity in the title will be affected. For example,
|
||||||
|
|
||||||
|
* **unity8**, containing the shell, will become **lomiri**
|
||||||
|
* **ubuntu-ui-toolkit** will become **lomiri-ui-toolkit**
|
||||||
|
* **ubuntu-download-manager** will become **lomiri-download-manager**
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
On top of this, interfaces call will change, as well. “For example, the **Ubuntu.Components** QML import will change to **Lomiri.Components**.” For the sake of backwards compatibility, Ubuntu Touch images will not change too much. “Developers will only need to update to the new API when they’d like to package their apps for other distributions.”
|
||||||
|
|
||||||
|
### What Will Stay the Same?
|
||||||
|
|
||||||
|
Since renaming packages can cause quite a few cascading problems, UBports wants to limit the number of packages they change. They don’t expect the following things to change.
|
||||||
|
|
||||||
|
* Packages that don’t use the “Ubuntu” or “Unity” names
|
||||||
|
* Ubuntu Touch will remain the same
|
||||||
|
* Any components which are already used by other projects and accepted into other distributions
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Final Thoughts
|
||||||
|
|
||||||
|
![][8]
|
||||||
|
|
||||||
|
Overall, I think this change will be good for Ubuntu Touch in the long run. I understand why [Canonical][9] picked the Unity name for their convergence desktop, but I think the desktop environment was overshadowed by the game engine from the beginning. This will give them room to breathe and also free up valuable coding time. The less time spent replying to questions about 3D models the more time that can be spent creating a convergent desktop.
|
||||||
|
|
||||||
|
If you have any further questions or concerns about the name change, you visit the [UBports forms][10]. They have set up a thread specifically for this topic.
|
||||||
|
|
||||||
|
Don’t hesitate to share our views on it in the comment section.
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
via: https://itsfoss.com/unity8-lomiri/
|
||||||
|
|
||||||
|
作者:[John Paul][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/john/
|
||||||
|
[b]: https://github.com/lujun9972
|
||||||
|
[1]: https://ubports.com/
|
||||||
|
[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/02/unity8_ubports.png?ssl=1
|
||||||
|
[3]: https://ubports.com/blog/ubports-blog-1/post/lomiri-new-name-same-great-unity8-265
|
||||||
|
[4]: https://en.wikipedia.org/wiki/Unity_(game_engine)
|
||||||
|
[5]: https://www.debian.org/
|
||||||
|
[6]: https://itsfoss.com/github-alternatives/
|
||||||
|
[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/02/Unity8-lomiri.png?ssl=1
|
||||||
|
[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/02/ubports.jpeg?ssl=1
|
||||||
|
[9]: https://canonical.com/
|
||||||
|
[10]: https://forums.ubports.com/topic/3874/unity8-is-now-lomiri
|
@ -0,0 +1,59 @@
|
|||||||
|
[#]: collector: (lujun9972)
|
||||||
|
[#]: translator: ( )
|
||||||
|
[#]: reviewer: ( )
|
||||||
|
[#]: publisher: ( )
|
||||||
|
[#]: url: ( )
|
||||||
|
[#]: subject: (Intel takes aim at Huawei 5G market presence)
|
||||||
|
[#]: via: (https://www.networkworld.com/article/3529354/intel-takes-aim-at-huawei-5g-market-presence.html)
|
||||||
|
[#]: author: (Andy Patrizio https://www.networkworld.com/author/Andy-Patrizio/)
|
||||||
|
|
||||||
|
Intel takes aim at Huawei 5G market presence
|
||||||
|
======
|
||||||
|
Intel has ambitious plans to grab the 5G base station marketplace, which is still in its infancy.
|
||||||
|
Christopher Hebert/IDG
|
||||||
|
|
||||||
|
Intel on Monday introduced a raft of new processors, and while updates to the Xeon Scalable lineup led the parade, the real news is Intel's efforts to go after the embattled Huawei Technologies in the 5G market.
|
||||||
|
|
||||||
|
Intel unveiled its first ever 5G integrated chip platform, the Atom P5900, for use in base stations. Navin Shenoy, executive vice president and general manager of the data platforms group at Intel, said the product is designed for 5G's high bandwidth and low latency and combines compute, 100Gb performance and acceleration into a single SoC.
|
||||||
|
|
||||||
|
"It delivers a performance punch in packet security throughput, and improved packet balancing throughput versus using software alone," Shenoy said in the video accompanying the announcement. Intel claims the dynamic load balancer native to the Atom P5900 chip is 3.7 times more efficient at packet balancing throughput than software alone.
|
||||||
|
|
||||||
|
Shenoy said Ericsson, Nokia, and ZTE have announced that they will use the Atom P5900 in their base stations. Intel hopes to be the market leader for silicon base station chips by 2021, aiming for 40% of the market and six million 5G base stations by 2024.
|
||||||
|
|
||||||
|
That's pretty aggressive, but the 5G fields are very green and there is plenty of room for growth. Despite all the mobile provider's commercials boasting of 5G availability, the fact is, true 5G phones are only just coming to market now, and the number of base stations is minimal. 5G has a long ramp ahead.
|
||||||
|
|
||||||
|
The Atom P5900 puts Intel in competition with China's Huawei, which U.S. federal authorities have repeatedly labeled a security risk. Huawei has been barred from several nations, including the U.S., England, Japan, and Australia. However, Huawei also said it has secured more than 90 commercial 5G contracts globally.
|
||||||
|
|
||||||
|
Until now, Ericsson and Nokia have asked developers such as Broadcom to help develop base station chips, while Samsung designs and manufactures its own 5G base station chips.
|
||||||
|
|
||||||
|
**[ [Take this mobile device management course from PluralSight and learn how to secure devices in your company without degrading the user experience.][1] ]**
|
||||||
|
|
||||||
|
### Second Generation Xeon Scalable processors
|
||||||
|
|
||||||
|
Intel's latest launch also includes 18 2nd Gen Xeon Scalable processors; one is branded Bronze, four are Silver, and 13 are Gold. The upgraded lineup targets the entry-level to medium-range market, leaving the Platinum to duke it out with the high end AMD Epyc processors.
|
||||||
|
|
||||||
|
The new processors range from 8 to 28 cores and include a variety of clock speeds that go down as the core count goes up. They have TDP ratings that range from 85 watts for the eight-core, 1.9Ghz Bronze 3206R to 205 watts for the 28-core, 2.7Ghz Gold 6258R. (Intel and other chip makers measure a processor's power draw with a specification called thermal design power, or TDP.) **
|
||||||
|
**
|
||||||
|
|
||||||
|
While most of the chips are meant for standard data center use, some processors – including the Xeon Gold 6200U, Silver 4200R, Sliver 4210T and Bronze 3200R – are specifically meant for single-socket, entry-level servers, as well as edge, networking and IoT uses.
|
||||||
|
|
||||||
|
Intel also introduced the Intel Ethernet 700 Network Adapter, which comes with hardware-enhanced precision timing designed specifically for 5G and other scenarios with very low latency and timing requirements.
|
||||||
|
|
||||||
|
Join the Network World communities on [Facebook][2] and [LinkedIn][3] to comment on topics that are top of mind.
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
via: https://www.networkworld.com/article/3529354/intel-takes-aim-at-huawei-5g-market-presence.html
|
||||||
|
|
||||||
|
作者:[Andy Patrizio][a]
|
||||||
|
选题:[lujun9972][b]
|
||||||
|
译者:[译者ID](https://github.com/译者ID)
|
||||||
|
校对:[校对者ID](https://github.com/校对者ID)
|
||||||
|
|
||||||
|
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||||
|
|
||||||
|
[a]: https://www.networkworld.com/author/Andy-Patrizio/
|
||||||
|
[b]: https://github.com/lujun9972
|
||||||
|
[1]: https://pluralsight.pxf.io/c/321564/424552/7490?u=https%3A%2F%2Fwww.pluralsight.com%2Fcourses%2Fmobile-device-management-big-picture
|
||||||
|
[2]: https://www.facebook.com/NetworkWorld/
|
||||||
|
[3]: https://www.linkedin.com/company/network-world
|
@ -0,0 +1,120 @@
|
|||||||
|
[#]: collector: (lujun9972)
|
||||||
|
[#]: translator: ( )
|
||||||
|
[#]: reviewer: ( )
|
||||||
|
[#]: publisher: ( )
|
||||||
|
[#]: url: ( )
|
||||||
|
[#]: subject: (Solus Linux Creator Ikey Doherty Enters the Game Dev Business With a New Open Source Game Engine)
|
||||||
|
[#]: via: (https://itsfoss.com/ikey-doherty-serpent-interview/)
|
||||||
|
[#]: author: (John Paul https://itsfoss.com/author/john/)
|
||||||
|
|
||||||
|
Solus Linux Creator Ikey Doherty Enters the Game Dev Business With a New Open Source Game Engine
|
||||||
|
======
|
||||||
|
|
||||||
|
[Ikey Doherty][1], the creator and former lead dev of [Solus][2], is back with a new project. His new company, [Lispy Snake, Ltd][3], uses open source technology to create games, with a focus on Linux support.
|
||||||
|
|
||||||
|
I asked Ikey some questions about his new project. Here are his answers.
|
||||||
|
|
||||||
|
![][4]
|
||||||
|
|
||||||
|
_**It’s FOSS: What made you decide to get into game development?**_
|
||||||
|
|
||||||
|
**Ikey**: Honestly I would have to say a respect for older games. The creativity that came from so much limitation is frankly amazing. If you think of how limited the NES or C64 were, (or indeed my [Amstrad CPC][5]) – yet how much joy people experienced from those platforms. It’s a buzz I can’t avoid. Even though we’re a long way now from that world, I still look to model that technical excellence and creativity as best I can. I’m a sucker for good stories.
|
||||||
|
|
||||||
|
_**It’s FOSS: There are already several open-source game engines. Why did you decide to make your own? What is Serpent’s killer feature?**_
|
||||||
|
|
||||||
|
**Ikey**: There are a good number of open and closed source ones, each with a great set of features. However, I’m a pretty old school developer and there is nothing I hate more than an IDE or ‘drag n drop’ codeless environment. I simply wanted to create indie games with the least fuss possible and using a framework where I didn’t have to compromise. Once you get to ‘must work nicely on Linux and be open source’ you’re kinda short on choice.
|
||||||
|
|
||||||
|
I collected a set of projects that I’d use as the foundation for Lispy Snake’s first games, but needed something of a framework to tie them all together, as a reusable codebase across all games and updates.
|
||||||
|
|
||||||
|
I wouldn’t say killer features are present yet – just a set of sensible decisions. Serpent is written in D so it’s highly performant with a lower barrier of entry than say C or C++. It’s allowing me to flesh out a framework that suits my development ideals and pays attention to industry requirements, such as a performant multithreading Entity Component System or the sprite batching system.
|
||||||
|
|
||||||
|
When you rope together all the features and decisions, you get a portable codebase, that thanks to its choice of libraries like SDL and bgfx, will eventually run on all major platforms with minimal effort on our part. That basically means we’re getting OpenGL, DirectX, Vulkan and Metal “for free”.
|
||||||
|
|
||||||
|
Being able to target the latest APIs and create indie games easily, with industry standard features emerging constantly, from a framework that doesn’t impose itself on your workflow…that’s a pretty good combination.
|
||||||
|
|
||||||
|
![][6]
|
||||||
|
|
||||||
|
_**It’s FOSS: Why did you name your company LispySnake? Did you have a pet snake with a speech impediment when you were a kid?**_
|
||||||
|
|
||||||
|
**Ikey**: Honestly? [Naughty Dog][7] was taken. Gotta love some Bandicoot. Plus, originally we were taking on some Python contracting work and I found the name amusing. It’s pretty much a nonsensical name like many of my previous projects (Like Dave. Or Dave2.)
|
||||||
|
|
||||||
|
_**It’s FOSS: After being an operating system developer for many years, how does it feel to be working on something smaller? Would you say that your time as an OS developer gives you an edge as a game dev?**_
|
||||||
|
|
||||||
|
**Ikey**: OS dev needs a very high level view constantly, with the ability to context switch from macro to micro and back again. Many, many moving parts in a large ecosystem.
|
||||||
|
|
||||||
|
Serpent is much more task orientated – though similarities in the workflow exist in terms of defining macro systems and interleaving micro features to build a cohesive whole. My background in OS dev is obviously a huge help here.
|
||||||
|
|
||||||
|
Where it especially shines is dealing with the ‘guts’. I think a lot of indie devs (forgive me for being sweeping) are generally happy to just build from an existing kit and either embrace it or workaround the issues. There are some true gems out there like Factorio that go above and beyond and I have to hold my hat to them.
|
||||||
|
|
||||||
|
In terms of building a new kit we get to think, properly, about cache coherency, parallel performance, memory fragmentation, context switching and such.
|
||||||
|
|
||||||
|
Consumers of Serpent (when released in a more stable form) will know that the framework has been designed to leverage Linux features, not just spitting out builds for it.
|
||||||
|
|
||||||
|
![][8]
|
||||||
|
|
||||||
|
_**It’s FOSS: Recently you ported your [Serpent][9] game engine from C to the [D language][10]. Why did you make this move? What features does D have over C?**_
|
||||||
|
|
||||||
|
**Ikey**: Yeah honestly that was an interesting move. We were originally working on a project called lispysnake2d which was to be a trivial wrapper around SDL to give us a micro-game library. This simply used SDL_Renderer APIs to blit 2D sprites and initially seemed sufficient. Unfortunately as development progressed it was clear we needed a 3D pipeline for 2D, so we could utilize shaders and special effects. At that point SDL_Renderer is no good to you anymore and you need to go with Vulkan or OpenGL. We began abstracting the pipelines and saw the madness ensue.
|
||||||
|
|
||||||
|
After taking a step back, I analyzed all the shortcomings in the approach, and tired of the portability issues that would definitely arise. I’m not talking in terms of libraries, I’m talking about dealing with various filepaths, encodings, Win32 APIs, DirectX vs OpenGL vs Vulkan…etc. Then whack in boilerplate time, C string shortcomings, and the amount of reinventing required to avoid linking to bloated “cross-platform” standard library style libraries. It was a bad picture.
|
||||||
|
|
||||||
|
Having done a lot of [Go][11] development, I started researching alternatives to C that were concurrency-aware, string-sane, and packed with a powerful cross-platform standard library. This is the part where everyone will automatically tell you to use Rust.
|
||||||
|
|
||||||
|
Unfortunately, I’m too stupid to use [Rust][12] because the syntax literally offends my eyes. I don’t get it, and I never will. Rust is a fantastic language and as academic endeavours go, highly successful. Unfortunately, I’m too practically minded and seek comfort in C-style languages, having lived in that world too long. So, D was the best candidate to tick all the boxes, whilst having C & C++ interoptability.
|
||||||
|
|
||||||
|
It took us a while to restore feature parity but now we have a concurrency-friendly framework which is tested with both OpenGL and Vulkan, supports sprite batching and has nice APIs. Plus, much of the reinvention is gone as we’re leveraging all the features of SDL, bgfx and the DLang standard library. Win win.
|
||||||
|
|
||||||
|
![The first game from LispySnake][13]
|
||||||
|
|
||||||
|
_**It’s FOSS: How are you planning to distribute your games?**_
|
||||||
|
|
||||||
|
**Ikey**: Demo wise we’ll initially only focus on Linux, and it’s looking like we’ll use Flatpak for that. As time goes on, when we’ve introduced support and testing for macOS + Windows, we’ll likely look to the Steam Store. Despite the closed source nature, Valve have been far more friendly and supportive of Linux over the years, whilst the likes of Epic Games have a long history of being highly anti-Linux. So that’s a no go.
|
||||||
|
|
||||||
|
_**It’s FOSS: How can people support and contribute to the development of the Serpent game engine?**_
|
||||||
|
|
||||||
|
**Ikey**: We have a few different methods, for what it’s worth. The easiest is to [buy a Lifetime License][14] – which is $20. This grants you lifetime access to all of our 2D games and helps fund development of our game titles and Serpent.
|
||||||
|
|
||||||
|
Alternatively, you can [sponsor me directly on GitHub][15] to work on Serpent and upstream where needed. Bit of FOSS love.
|
||||||
|
|
||||||
|
[Support with Lifetime License][16]
|
||||||
|
|
||||||
|
[Sponsor the development on GitHub][15]
|
||||||
|
|
||||||
|
* * *
|
||||||
|
|
||||||
|
I would like to thank Ikey for taking the time to answer my questions about his latest project.
|
||||||
|
|
||||||
|
Have any of you created a game with open source tools? If so, what tools and how was the experience? Please let us know in the comments below.
|
||||||
|
|
||||||
|
If you found this article interesting, please take a minute to share it on social media, Hacker News or [Reddit][17].
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
via: https://itsfoss.com/ikey-doherty-serpent-interview/
|
||||||
|
|
||||||
|
作者:[John Paul][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/john/
|
||||||
|
[b]: https://github.com/lujun9972
|
||||||
|
[1]: https://twitter.com/ikey_doherty
|
||||||
|
[2]: https://getsol.us/home/
|
||||||
|
[3]: https://lispysnake.com/
|
||||||
|
[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/02/ikey_doherty_serpent_interview.png?ssl=1
|
||||||
|
[5]: https://en.wikipedia.org/wiki/Amstrad_CPC
|
||||||
|
[6]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/02/lipsy_snake_screenshot.png?ssl=1
|
||||||
|
[7]: https://www.naughtydog.com/
|
||||||
|
[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/02/lipsy_snake.png?ssl=1
|
||||||
|
[9]: https://github.com/lispysnake/serpent
|
||||||
|
[10]: https://dlang.org/
|
||||||
|
[11]: https://golang.org/
|
||||||
|
[12]: https://www.rust-lang.org/
|
||||||
|
[13]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/02/last_peacekeeper_game.png?ssl=1
|
||||||
|
[14]: https://lispysnake.com/the-game-raiser/
|
||||||
|
[15]: https://github.com/sponsors/ikeycode
|
||||||
|
[16]: https://lispysnake.com/the-game-raiser
|
||||||
|
[17]: https://reddit.com/r/linuxusersgroup
|
@ -1,5 +1,5 @@
|
|||||||
[#]: collector: (lujun9972)
|
[#]: collector: (lujun9972)
|
||||||
[#]: translator: ( )
|
[#]: translator: (hj24)
|
||||||
[#]: reviewer: ( )
|
[#]: reviewer: ( )
|
||||||
[#]: publisher: ( )
|
[#]: publisher: ( )
|
||||||
[#]: url: ( )
|
[#]: url: ( )
|
||||||
|
@ -0,0 +1,126 @@
|
|||||||
|
[#]: collector: (lujun9972)
|
||||||
|
[#]: translator: ( )
|
||||||
|
[#]: reviewer: ( )
|
||||||
|
[#]: publisher: ( )
|
||||||
|
[#]: url: ( )
|
||||||
|
[#]: subject: (4 technologists on careers in tech for minorities)
|
||||||
|
[#]: via: (https://opensource.com/article/20/2/careers-tech-minorities)
|
||||||
|
[#]: author: (Shilla Saebi https://opensource.com/users/shillasaebi)
|
||||||
|
|
||||||
|
4 technologists on careers in tech for minorities
|
||||||
|
======
|
||||||
|
Learn what Black History Month means to them, what influences their
|
||||||
|
career, resources for minorities wanting to break into tech, and more.
|
||||||
|
![Team meeting][1]
|
||||||
|
|
||||||
|
In honor of Black History Month, I've garnered the opinions of a few of my favorite technology professionals and open source contributors. These four individuals are paving the way for the next generation alongside the work they're doing in the technology industry. Learn what Black History Month means to them, what influences their career, resources for minorities wanting to break into tech, and more.
|
||||||
|
|
||||||
|
**[Tameika Reed][2], founder of Women In Linux**
|
||||||
|
|
||||||
|
Since its launch, Tameika leads initiatives with a focus on exploring careers in infrastructure, cybersecurity, DevOps and IoT, pivoting into leadership and continuous skill-building. As a self-taught system administrator, Tameika believes the best way to learn tech is by just diving in. In efforts to give women a 360° view of tech, Tameika hosts a weekly virtual meetup to explore outside the norm of just Linux but introducing hyperledger, Kubernetes, microservices, and high-performance computing. Tameika’s career includes different conference talks from OSCon, LISA 2018, Seagl, HashiCorp EU 2019, and various local events.
|
||||||
|
|
||||||
|
**[Michael Scott Winslow][3], Director, Core Applications and Platforms, Comcast**
|
||||||
|
|
||||||
|
"I'm a father, husband, brother, and son. I come from a small family so I have fun turning friends into an extended family. When I attach my name to something, I obsess over its success, so I am very careful what I agree to be a part of. Oh, so as far as my career I have been involved with software development for decades. I solve problems. I work with others to help solve large problems. I lead, guide and mentor newer software engineers while observing others that I want to learn from."
|
||||||
|
|
||||||
|
**[Bryan Liles][4], senior staff engineer, VMware**
|
||||||
|
|
||||||
|
"I’m working with our team to rethink how developers interact with Kubernetes. When not working, I’m out in the community trying to inspire the next generation of software engineers and building robots."
|
||||||
|
|
||||||
|
**[Mutale Nkonde][5], founding CEO of AI For the People (AFP)**
|
||||||
|
|
||||||
|
AFP is a nonprofit creative agency. Prior to starting a nonprofit she worked in AI Governance. During that time she was part of the team that introduced the Algorithmic and Deep Fakes Algorithmic Acts, as well as the No Biometric Barriers to Housing Act to the US House of Representatives. Nkonde started her career as a broadcast journalist and worked at the BBC, CNN & ABC. She also writes widely on race and tech, as well as holding fellowships at Harvard and Stanford.
|
||||||
|
|
||||||
|
### What influenced you to pursue a career in technology?
|
||||||
|
|
||||||
|
My fear of the computer when I went back to college. I was afraid of the computer because I dropped out of college. After and going back, I made it my mission to learn all I can. This is still my motto to this day, learning never stops. —Tameika Reed
|
||||||
|
|
||||||
|
I won’t mince words, I was a child geek! At 10 years old I started writing GW-BASIC from code that I read in printed magazines. Every single day. I gave it a bit of a break to have a life while I went to high school, but when it came time to pick a major for college, it was an easy choice. I stayed in technology thanks to the amazing mentors and colleagues I’ve had along the way. —Michael Scott Winslow
|
||||||
|
|
||||||
|
I’ve been writing software since I was in middle school. I like being able to tell computers to do things and seeing the results. As an adult, I quickly realized that having a job that gave me satisfaction and paid well was the way to go. —Bryan Liles
|
||||||
|
|
||||||
|
I wanted to explore the questions around why so few black women were being hired by tech companies. —Mutale Nkonde
|
||||||
|
|
||||||
|
### Is there a particular person or people in open source and the tech world who have inspired you?
|
||||||
|
|
||||||
|
I get inspired by a lot of other people and projects. For example, I love seeing others come to [Women In Linux][6] and are sure where they want to go. I try to give people a 360-view of tech so they can make a decision on what they like. Its easy to say I want to be in tech but it’s hard to get started and stay. You don’t have to be just a coder/programmer but you can be a cloud architect. —Tameika Reed
|
||||||
|
|
||||||
|
[Kelsey Hightower][7], [Bryan Liles][4], and Kim Scott inspire me very much. They are so REAL! They say things that I feel and experience every day. Get your job done! Stop complaining! Own your actions and understand how you contribute to your situation! [Gene Kim][8] is a big inspiration as well. As a leader in the DevOps movement, I see myself following and emulating a lot of things he does. —Michael Scott Winslow
|
||||||
|
|
||||||
|
No. I didn’t see the inspiration I wanted, so I’ve worked hard to be the inspiration I needed 20 years ago. —Bryan Liles
|
||||||
|
|
||||||
|
There are so many! One of my favorites is [Dorothy Vaughan][9]: She was the first person in the US to program an IBM Watson computer. Her story is captured in the movie Hidden Figures. —Mutale Nkonde
|
||||||
|
|
||||||
|
### Are there particular resources you would recommend for minorities wanting to break into tech?
|
||||||
|
|
||||||
|
Yes, I recommend finding folks on Twitter and just ask questions. Here is a list of people I follow and admire in tech: —Tameika Reed
|
||||||
|
|
||||||
|
* [@techgirl1908][10]
|
||||||
|
* [@bryanl][4]
|
||||||
|
* [@kelseyhightower][7]
|
||||||
|
* [@kstewart][11]
|
||||||
|
* [@tiffani][12]
|
||||||
|
* [@EricaJoy][13]
|
||||||
|
* [@womeninlinux][6]
|
||||||
|
* [@ArlanWasHere][14]
|
||||||
|
* [@blkintechnology][15]
|
||||||
|
* [@digundiv][16]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Respected bootcamps are really cutting down the time it takes to break into the tech industry. I’ve met several professionals who went through bootcamps who have outshined their 4-year institution counterparts. I think we can really start respecting everything that people bring to the table, rather than technical fluency. —Michael Scott Winslow
|
||||||
|
|
||||||
|
I’m not sure I can recommend anything specific. Tech is a big thing and there isn’t an easy answer. My advice is to pick something you think will be interested in and work to become an expert on the topic. Start asking why instead of how, and also start understanding how things work together. — Bryan Liles
|
||||||
|
|
||||||
|
It really depends on the type of work they want to do. For people working at the intersection of tech and social justice, I would recommend the book [Algorithms of Oppression][17] by Safiya Noble. —Mutale Nkonde
|
||||||
|
|
||||||
|
### What advice would you give to a person of color considering technology as their career?
|
||||||
|
|
||||||
|
I suggest you study your craft. You will be a forever learner. There will always be someone or something in your way how you respond and move will be on you. Never take the first offer push back and know your worth. I look at tech like I look at art. It takes time to develop so be patient with yourself. It's okay to unplug and say no. —Tameika Reed
|
||||||
|
|
||||||
|
As someone who is a bit of a protector of the industry, I don’t want people who are not suited for technology. So really decide if you have the personality for tech. Are you a problem solver? Are you more logical than emotional? Do you constantly find yourself creating processes? If so, no matter your background, I think you can find a home in tech. —Michael Scott Winslow
|
||||||
|
|
||||||
|
It is not going to be simple. Your progress will be slowed because of your race. You will have to work harder. Use this adversity as a strength. You will be better prepared than those around you and when the opportunity arises, you will be able to tackle it. Find a network of those who look like you. Air grievances in private and show strength in public. You belong and you can succeed. —Bryan Liles
|
||||||
|
|
||||||
|
To think beyond working for a company, the field of public interest tech is growing, our work centers on how technology impacts real people. Many of the people leading this work are women of color and Black women are making huge strides. Mutale Nkonde
|
||||||
|
|
||||||
|
### What does Black History Month mean to you?
|
||||||
|
|
||||||
|
It means never stop because you can never forget. —Tameika Reed
|
||||||
|
|
||||||
|
Black History Month to me means focusing on the Tuskegee Airmen and not slavery. Highlighting how we contributed to history and not how were victims of it. I want people to understand where our pride comes from and not our anger. There are a lot of really bad things that happened to our people and we are still right here. Strong! —Michael Scott Winslow
|
||||||
|
|
||||||
|
Black History Month is a time to reflect on the forgotten history of black people in the United States. I take it as a time to be thankful for the sacrifices my ancestors made. —Bryan Liles
|
||||||
|
|
||||||
|
It is a time to center the contributions black people have made across the globe. I love it, it is one of my favorite times of year. —Mutale Nkonde
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
via: https://opensource.com/article/20/2/careers-tech-minorities
|
||||||
|
|
||||||
|
作者:[Shilla Saebi][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/shillasaebi
|
||||||
|
[b]: https://github.com/lujun9972
|
||||||
|
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/meeting-team-listen-communicate.png?itok=KEBP6vZ_ (Team meeting)
|
||||||
|
[2]: https://www.linkedin.com/in/tameika-reed-1a7290128/
|
||||||
|
[3]: https://twitter.com/michaelswinslow
|
||||||
|
[4]: https://twitter.com/bryanl
|
||||||
|
[5]: https://twitter.com/mutalenkonde
|
||||||
|
[6]: https://twitter.com/WomenInLinux
|
||||||
|
[7]: https://twitter.com/kelseyhightower
|
||||||
|
[8]: https://twitter.com/RealGeneKim
|
||||||
|
[9]: https://en.wikipedia.org/wiki/Dorothy_Vaughan
|
||||||
|
[10]: https://twitter.com/techgirl1908
|
||||||
|
[11]: https://twitter.com/kstewart
|
||||||
|
[12]: https://twitter.com/tiffani
|
||||||
|
[13]: https://twitter.com/EricaJoy
|
||||||
|
[14]: https://twitter.com/ArlanWasHere
|
||||||
|
[15]: https://twitter.com/blkintechnology
|
||||||
|
[16]: https://twitter.com/digundiv
|
||||||
|
[17]: http://algorithmsofoppression.com/
|
@ -0,0 +1,161 @@
|
|||||||
|
[#]: collector: (lujun9972)
|
||||||
|
[#]: translator: ( )
|
||||||
|
[#]: reviewer: ( )
|
||||||
|
[#]: publisher: ( )
|
||||||
|
[#]: url: ( )
|
||||||
|
[#]: subject: (Converting between uppercase and lowercase on the Linux command line)
|
||||||
|
[#]: via: (https://www.networkworld.com/article/3529409/converting-between-uppercase-and-lowercase-on-the-linux-command-line.html)
|
||||||
|
[#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/)
|
||||||
|
|
||||||
|
Converting between uppercase and lowercase on the Linux command line
|
||||||
|
======
|
||||||
|
Converting text between uppercase and lowercase can be very tedious, especially when you want to avoid inadvertent misspellings. Fortunately, Linux provides a handful of commands that can make the job very easy.
|
||||||
|
[andy.brandon50][1] [(CC BY-SA 2.0)][2]
|
||||||
|
|
||||||
|
There are many ways to change text on the Linux command line from lowercase to uppercase and vice versa. In fact, you have an impressive set of commands to choose from. This post examines some of the best commands for the job and how you can get them to do just what you want.
|
||||||
|
|
||||||
|
### Using tr
|
||||||
|
|
||||||
|
The **tr** (translate) command is one of the easiest to use on the command line or within a script. If you have a string that you want to be sure is in uppercase, you just pass it through a **tr** command like this:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ echo Hello There | tr [:lower:] [:upper:]
|
||||||
|
HELLO THERE
|
||||||
|
```
|
||||||
|
|
||||||
|
[[Get regularly scheduled insights by signing up for Network World newsletters.]][3]
|
||||||
|
|
||||||
|
Below is an example of using this kind of command in a script when you want to be sure that all of the text that is added to a file is in uppercase for consistency:
|
||||||
|
|
||||||
|
```
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo -n "Enter department name: "
|
||||||
|
read dept
|
||||||
|
echo $dept | tr [:lower:] [:upper:] >> depts
|
||||||
|
```
|
||||||
|
|
||||||
|
Switching the order to [:upper:] [:lower:] would have the opposite effect, putting all the department names in lowercase:
|
||||||
|
|
||||||
|
```
|
||||||
|
echo $dept | tr [:upper:] [:lower:] >> depts
|
||||||
|
```
|
||||||
|
|
||||||
|
Similarly, you could use the **sed** command's **A-Z** and **a-z** strings to accomplish the same thing:
|
||||||
|
|
||||||
|
```
|
||||||
|
echo $dept | tr a-z A-Z >> depts
|
||||||
|
```
|
||||||
|
|
||||||
|
As you undoubtedly suspect, reversing the order of the a-z and A-Z strings will have the opposite effect, turning the text to all lowercase.
|
||||||
|
|
||||||
|
### Using awk
|
||||||
|
|
||||||
|
The **awk** command lets you do the same thing with its **toupper** and **tolower** options. The command in the script shown in the previous example could be done this way instead:
|
||||||
|
|
||||||
|
[][4]
|
||||||
|
|
||||||
|
```
|
||||||
|
echo $dept | awk '{print toupper($0)}' >> depts
|
||||||
|
```
|
||||||
|
|
||||||
|
The reverse (switching to lowercase) would look like this:
|
||||||
|
|
||||||
|
```
|
||||||
|
echo $dept | awk '{print tolower($0)}' >> depts
|
||||||
|
```
|
||||||
|
|
||||||
|
### Using sed
|
||||||
|
|
||||||
|
The **sed** (stream editor) command also does a great job of switching between upper- and lowercase. This command would have the same effect as the first of the two shown above.
|
||||||
|
|
||||||
|
```
|
||||||
|
echo $dept | sed 's/[a-z]/\U&/g' >> depts
|
||||||
|
```
|
||||||
|
|
||||||
|
Switching from uppercase to lowercase would simply involve replacing the **U** near the end of the line with an **L**.
|
||||||
|
|
||||||
|
```
|
||||||
|
echo $dept | sed 's/[A-Z]/\L&/g' >> depts
|
||||||
|
```
|
||||||
|
|
||||||
|
### Manipulating text in a file
|
||||||
|
|
||||||
|
Both **awk** and **sed** also allow you to change the case of text for entire files. So, you just found out your boss wanted those department names in all lowercase? No problem. Just run a command like this with the file name provided:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ awk '{print tolower($0)}' depts
|
||||||
|
finance
|
||||||
|
billing
|
||||||
|
bookkeeping
|
||||||
|
```
|
||||||
|
|
||||||
|
If you want to overwrite the **depts** file, instead of just displaying its contents in lowercase, you would need to do something like this:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ awk '{print tolower($0)}' depts > depts-
|
||||||
|
$ mv depts- depts
|
||||||
|
```
|
||||||
|
|
||||||
|
Making the change with **sed**, however, you can avoid that last step because **sed** can edit a file "in place" as shown here, leaving the file intact, but the text in all lowercase:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ sed 's/[A-Z]/\L&/g' depts
|
||||||
|
```
|
||||||
|
|
||||||
|
### Capitalizing first letters only
|
||||||
|
|
||||||
|
To capitalize only the first letters of words in a string, you can do something like this:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ echo design \& engineering| sed -e "s/\b\(.\)/\u\1/g"
|
||||||
|
Design & Engineering
|
||||||
|
```
|
||||||
|
|
||||||
|
That command will ensure that first letters are capitalized, but won't change the rest of the letters.
|
||||||
|
|
||||||
|
### Making sure only first letters are uppercase
|
||||||
|
|
||||||
|
It's a little more challenging when you want to change text so that only first letters are in uppercase. Say you're manipulating a list of staff members' names and you want them to be formatted in the normal Firstname Lastname manner.
|
||||||
|
|
||||||
|
##### with sed
|
||||||
|
|
||||||
|
You could use a considerably more complex **sed** command to ensure this result:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ echo design \& ENGINEERING | sed 's/\b\([[:alpha:]]\)\([[:alpha:]]*\)\b/\u\1\L\2/g'
|
||||||
|
Design & Engineering
|
||||||
|
```
|
||||||
|
|
||||||
|
##### with python
|
||||||
|
|
||||||
|
If you have python loaded, you can run a command like this that also formats text so that only the first letters of each word are capitalized and the command may be a little easier to parse than the **sed** command shown above:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ echo -n "design & engineering" | python3 -c "import sys; print(sys.stdin.read().title())"
|
||||||
|
Design & Engineering
|
||||||
|
```
|
||||||
|
|
||||||
|
There are many ways to change the formatting of text between upper- and lowercase. Which works best depends in part of whether you're manipulating a single string or an entire file and how you want the end result to look.
|
||||||
|
|
||||||
|
Join the Network World communities on [Facebook][5] and [LinkedIn][6] to comment on topics that are top of mind.
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
via: https://www.networkworld.com/article/3529409/converting-between-uppercase-and-lowercase-on-the-linux-command-line.html
|
||||||
|
|
||||||
|
作者:[Sandra Henry-Stocker][a]
|
||||||
|
选题:[lujun9972][b]
|
||||||
|
译者:[译者ID](https://github.com/译者ID)
|
||||||
|
校对:[校对者ID](https://github.com/校对者ID)
|
||||||
|
|
||||||
|
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||||
|
|
||||||
|
[a]: https://www.networkworld.com/author/Sandra-Henry_Stocker/
|
||||||
|
[b]: https://github.com/lujun9972
|
||||||
|
[1]: https://www.flickr.com/photos/54027476@N07/4999959929
|
||||||
|
[2]: https://creativecommons.org/licenses/by-sa/2.0/legalcode
|
||||||
|
[3]: https://www.networkworld.com/newsletters/signup.html
|
||||||
|
[4]: https://www.networkworld.com/article/3440100/take-the-intelligent-route-with-consumption-based-storage.html?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE21620&utm_content=sidebar ( Take the Intelligent Route with Consumption-Based Storage)
|
||||||
|
[5]: https://www.facebook.com/NetworkWorld/
|
||||||
|
[6]: https://www.linkedin.com/company/network-world
|
128
sources/tech/20200228 Getting started with Linux firewalls.md
Normal file
128
sources/tech/20200228 Getting started with Linux firewalls.md
Normal file
@ -0,0 +1,128 @@
|
|||||||
|
[#]: collector: (lujun9972)
|
||||||
|
[#]: translator: ( )
|
||||||
|
[#]: reviewer: ( )
|
||||||
|
[#]: publisher: ( )
|
||||||
|
[#]: url: ( )
|
||||||
|
[#]: subject: (Getting started with Linux firewalls)
|
||||||
|
[#]: via: (https://opensource.com/article/20/2/firewall-cheat-sheet)
|
||||||
|
[#]: author: (Seth Kenlon https://opensource.com/users/seth)
|
||||||
|
|
||||||
|
Getting started with Linux firewalls
|
||||||
|
======
|
||||||
|
A firewall is your computer's first line of defense against network
|
||||||
|
intrusion. Download our cheat sheet to make sure you're secure.
|
||||||
|
![Cheat Sheet cover image][1]
|
||||||
|
|
||||||
|
A sensible firewall is your computer's first line of defense against network intrusion. When you're at home, you're probably behind a firewall built into the router supplied by your internet service provider. When you're away from home, though, the only firewall you have is the one running on your computer, so it's important to configure and control the firewall on your Linux computer. If you run a Linux server, it's just as important to know how to manage your firewall so that you can protect it from unwanted traffic both locally and remotely.
|
||||||
|
|
||||||
|
### Install a firewall
|
||||||
|
|
||||||
|
Many Linux distributions ship with a firewall already installed, and traditionally that was **iptables**. It is extremely effective and customizable, but it can be complex to configure. Luckily, developers have produced several frontends to help users control their firewall without writing lengthy iptables rules.
|
||||||
|
|
||||||
|
On Fedora, CentOS, Red Hat, and similar distributions, the firewall software installed by default is **firewalld**, which is configured and controlled with the **firewall-cmd** command. On Debian and most other distributions, firewalld is available to install from your software repository. Ubuntu ships with the Uncomplicated Firewall (ufw), so to use firewalld, you must enable the **universe** repository:
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
$ sudo add-apt-repository universe
|
||||||
|
$ sudo apt install firewalld
|
||||||
|
```
|
||||||
|
|
||||||
|
You must also deactivate ufw:
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
`$ sudo systemctl disable ufw`
|
||||||
|
```
|
||||||
|
|
||||||
|
There's no reason _not_ to use ufw. It's an excellent firewall frontend. However, this article focuses on firewalld because of its wide availability and integration into systemd, which is shipped with nearly every distribution.
|
||||||
|
|
||||||
|
Regardless of your distribution, for a firewall to be effective, it must be active, and it should be loaded at boot time:
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
`$ sudo systemctl enable --now firewalld`
|
||||||
|
```
|
||||||
|
|
||||||
|
### Understanding firewall zones
|
||||||
|
|
||||||
|
Firewalld aims to make firewall configuration as simple as possible. It does this by establishing _zones_. A zone is a set of sensible, common rules that suit the everyday needs of most users. There are nine by default:
|
||||||
|
|
||||||
|
* **trusted:** All network connections are accepted. This is the least paranoid firewall setting and should only be used in a trusted environment, such as a test lab or in a family home where everyone on the local network is known to be friendly.
|
||||||
|
* **home, work, internal:** In these three zones, most incoming connections are accepted. They each exclude traffic on ports that usually expect no activity. Any of them is a reasonable setting for use in a home setting where there is no reason to expect network traffic to obscure ports, and you generally trust the other users on the network.
|
||||||
|
* **public:** For use in public areas. This is a paranoid setting, intended for times when you do not trust other computers on the network. Only selected common and mostly safe incoming connections are accepted.
|
||||||
|
* **dmz:** DMZ stands for demilitarized zone. This zone is intended for computers that are publically accessible, located on an organization's external network with limited access to the internal network. For personal computers, this is usually not a useful zone, but it is an important option for certain types of servers.
|
||||||
|
* **external:** For use on external networks with masquerading enabled (meaning the addresses of your private network are mapped to and hidden behind a public IP address). Similar to the dmz zone, only selected incoming connections are accepted, including SSH.
|
||||||
|
* **block:** Only network connections initiated within this system are possible, and all incoming network connections are rejected with an **icmp-host-prohibited** message. This is an extremely paranoid setting and is an important option for certain types of servers or personal computers in an untrusted or hostile environment.
|
||||||
|
* **drop:** Any and all incoming network packets are dropped with no reply. Only outgoing network connections are possible. The only setting more paranoid than this one is turning off your WiFi and unplugging your Ethernet cable.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
You can read about each zone and any other zones defined by your distribution or sysadmin by looking at the configuration files in **/usr/lib/firewalld/zones**. For instance, here's the FedoraWorkstation zone that ships with Fedora 31:
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
$ cat /usr/lib/firewalld/zones/FedoraWorkstation.xml
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<zone>
|
||||||
|
<short>Fedora Workstation</short>
|
||||||
|
<description>Unsolicited incoming network packets are rejected from port 1 to 1024, except for select network services. Incoming packets that are related to outgoing network connections are accepted. Outgoing network connections are allowed.</description>
|
||||||
|
<service name="dhcpv6-client"/>
|
||||||
|
<service name="ssh"/>
|
||||||
|
<service name="samba-client"/>
|
||||||
|
<port protocol="udp" port="1025-65535"/>
|
||||||
|
<port protocol="tcp" port="1025-65535"/>
|
||||||
|
</zone>
|
||||||
|
```
|
||||||
|
|
||||||
|
### Getting your current zone
|
||||||
|
|
||||||
|
You can see what zone you're in at any time with the **\--get-active-zones** option:
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
`$ sudo firewall-cmd --get-active-zones`
|
||||||
|
```
|
||||||
|
|
||||||
|
In response, you receive the name of the active zone along with the network interface assigned to it. On a laptop, that usually means you have a WiFi card in the default zone:
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
FedoraWorkstation
|
||||||
|
interfaces: wlp61s0
|
||||||
|
```
|
||||||
|
|
||||||
|
### Change your current zone
|
||||||
|
|
||||||
|
To change your zone, reassign your network interface to a different zone. For instance, to change the example **wlp61s0** card to the public zone:
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
$ sudo firewall-cmd --change-interface=wlp61s0 \
|
||||||
|
\--zone=public
|
||||||
|
```
|
||||||
|
|
||||||
|
You can change the active zone for an interface any time you please and for any reason—whether you're going out to a café and feel the need to increase your laptop's security policy, or you're going to work and need to open up some ports to get on the intranet, or for any other reason. The options for **firewall-cmd** auto-complete when you press the **Tab** key, so as long as you remember the keywords "change" and "zone," you can stumble through the command until you learn it by memory.
|
||||||
|
|
||||||
|
### Learn more
|
||||||
|
|
||||||
|
There's a lot more you can do with your firewall, including customizing existing zones, setting a default zone, and more. The more comfortable with firewalls you get, the more secure your online activities are, so we've created a [cheat sheet][2] for quick and easy reference.
|
||||||
|
|
||||||
|
### Download your [firewall cheat sheet][2]
|
||||||
|
|
||||||
|
David Both shares how he replaced his dedicated network firewall computer with a Raspberry Pi 2.
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
via: https://opensource.com/article/20/2/firewall-cheat-sheet
|
||||||
|
|
||||||
|
作者:[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/coverimage_cheat_sheet.png?itok=lYkNKieP (Cheat Sheet cover image)
|
||||||
|
[2]: https://opensource.com/downloads/firewall-cmd-cheat-sheet
|
@ -0,0 +1,87 @@
|
|||||||
|
[#]: collector: (lujun9972)
|
||||||
|
[#]: translator: ( )
|
||||||
|
[#]: reviewer: ( )
|
||||||
|
[#]: publisher: ( )
|
||||||
|
[#]: url: ( )
|
||||||
|
[#]: subject: (How to process real-time data with Apache)
|
||||||
|
[#]: via: (https://opensource.com/article/20/2/real-time-data-processing)
|
||||||
|
[#]: author: (Simon Crosby https://opensource.com/users/simon-crosby)
|
||||||
|
|
||||||
|
How to process real-time data with Apache
|
||||||
|
======
|
||||||
|
Open source is leading the way with a rich canvas of projects for
|
||||||
|
processing real-time events.
|
||||||
|
![Alarm clocks with different time][1]
|
||||||
|
|
||||||
|
In the "always-on" future with billions of connected devices, storing raw data for analysis later will not be an option because users want accurate responses in real time. Prediction of failures and other context-sensitive conditions require data to be processed in real time—certainly before it hits a database.
|
||||||
|
|
||||||
|
It's tempting to simply say "the cloud will scale" to meet demands to process streaming data in real time, but some simple examples show that it can never meet the need for real-time responsiveness to boundless data streams. In these situations—from mobile devices to IoT—a new paradigm is needed. Whereas cloud computing relies on a "store then analyze" big data approach, there is a critical need for software frameworks that are comfortable instantly processing endless, noisy, and voluminous streams of data as they arrive to permit a real-time response, prediction, or insight.
|
||||||
|
|
||||||
|
For example, the city of Palo Alto, Calif. produces more streaming data from its traffic infrastructure per day than the Twitter Firehose. That's a lot of data. Predicting city traffic for consumers like Uber, Lyft, and FedEx requires real-time analysis, learning, and prediction. Event processing in the cloud leads to an inescapable latency of about half a second per event.
|
||||||
|
|
||||||
|
We need a simple yet powerful programming paradigm that lets applications process boundless data streams on the fly in these and similar situations:
|
||||||
|
|
||||||
|
* Data volumes are huge, or moving raw data is expensive.
|
||||||
|
* Data is generated by widely distributed assets (such as mobile devices).
|
||||||
|
* Data is of ephemeral value, and analysis can't wait.
|
||||||
|
* It is critical to always have the latest insight, and extrapolation won't do.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Publish and subscribe
|
||||||
|
|
||||||
|
A key architectural pattern in the domain of event-driven systems is the concept of pub/sub or publish/subscribe messaging. This is an asynchronous communication method in which messages are delivered from _publishers_ (anything producing data) to *subscribers (*applications that process data). Pub/sub decouples arbitrary numbers of senders from an unknown set of consumers.
|
||||||
|
|
||||||
|
In pub/sub, sources _publish_ events for a _topic_ to a _broker_ that stores them in the order in which they are received. An application _subscribes_ to one or more _topics_, and the _broker_ forwards matching events. Apache Kafka and Pulsar and CNCF NATS are pub/sub systems. Cloud services for pub/sub include Google Pub/Sub, AWS Kinesis, Azure Service Bus, Confluent Cloud, and others.
|
||||||
|
|
||||||
|
Pub/sub systems do not _run_ subscriber applications—they simply _deliver_ data to topic subscribers.
|
||||||
|
|
||||||
|
Streaming data often contains events that are updates to the state of applications or infrastructure. When choosing an architecture to process data, the role of a data-distribution system such as a pub/sub framework is limited. The "how" of the consumer application lies beyond the scope of the pub/sub system. This leaves an enormous amount of complexity for the developer to manage. So-called stream processors are a special kind of subscriber that analyzes data on the fly and delivers results back to the same broker.
|
||||||
|
|
||||||
|
### Apache Spark
|
||||||
|
|
||||||
|
[Apache Spark][2] is a unified analytics engine for large-scale data processing. Often, Apache Spark Streaming is used as a stream processor, for example, to feed machine learning models with new data. Spark Streaming breaks data into mini-batches that are each independently analyzed by a Spark model or some other system. The stream of events is grouped into mini-batches for analysis, but the stream processor itself must be elastic:
|
||||||
|
|
||||||
|
* The stream processor must be capable of scaling with the data rate, even across servers and clouds, and also balance load across instances, ensuring resilience and other application-layer needs.
|
||||||
|
* It must be able to analyze data from sources that report at widely different rates, meaning it must be stateful—or store state in a database. This latter approach is often used when Spark Streaming is used as the stream processor and can cause performance problems when ultra-low latency responses are needed.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
A related project, [Apache Samza][3], offers a way to process real-time event streams, and to scale elastically using [Hadoop Yarn][4] or [Apache Mesos][5] to manage compute resources.
|
||||||
|
|
||||||
|
### Solving the problem of scaling data
|
||||||
|
|
||||||
|
It's important to note that even Samza cannot entirely alleviate data processing demands for the application developer. Scaling data rates mean that tasks to process events need to be load-balanced across many instances, and the only way to share the resulting application-layer state between instances is to use a database. However, the moment state coordination between tasks of an application devolves to a database, there is an inevitable knock-on effect upon performance. Moreover, the choice of database is crucial. As the system scales, cluster management for the database becomes the next potential bottleneck.
|
||||||
|
|
||||||
|
This can be solved with alternative solutions that are stateful, elastic, and can be used in place of a stream processor. At the application level (within each container or instance), these solutions build a stateful model of concurrent, interlinked "web agents" on the fly from streaming updates. Agents are concurrent "nano-services" that consume raw data for a single source and maintain their state. Agents interlink to share state based on real-world relationships between sources found in the data, such as containment and proximity. Agents thus form a graph of concurrent services that can analyze their own state and the states of agents to which they are linked. Each agent provides a nano-service for a single data source that converts from raw data to state and analyzes, learns, and predicts from its own changes and those of its linked subgraph.
|
||||||
|
|
||||||
|
These solutions simplify application architecture by allowing agents—digital twins of real-world sources—to be widely distributed, even while maintaining the distributed graph that interlinks them at the application layer. This is because the links are URLs that map to the current runtime execution instance of the solution and the agent itself. In this way, the application seamlessly scales across instances without DevOps concerns. Agents consume data and maintain state. They also compute over their own state and that of other agents. Because agents are stateful, there is no need for a database, and insights are computed at memory speed.
|
||||||
|
|
||||||
|
### Reading world data with open source
|
||||||
|
|
||||||
|
There is a sea change afoot in the way we view data: Instead of the database being the system of record, the real world is, and digital twins of real-world things can continuously stream their state. Fortunately, the open source community is leading the way with a rich canvas of projects for processing real-time events. From pub/sub, where the most active communities are Apache Kafka, Pulsar, and CNCF NATS, to the analytical frameworks that continually process streamed data, including Apache Spark, [Flink][6], [Beam][7], Samza, and Apache-licensed [SwimOS][8] and [Hazelcast][9], developers have the widest choices of software systems. Specifically, there is no richer set of proprietary software frameworks available. Developers have spoken, and the future of software is open source.
|
||||||
|
|
||||||
|
Introduction to Apache Hadoop, an open source software framework for storage and large scale...
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
via: https://opensource.com/article/20/2/real-time-data-processing
|
||||||
|
|
||||||
|
作者:[Simon Crosby][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/simon-crosby
|
||||||
|
[b]: https://github.com/lujun9972
|
||||||
|
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/clocks_time.png?itok=_ID09GDk (Alarm clocks with different time)
|
||||||
|
[2]: https://spark.apache.org/
|
||||||
|
[3]: https://samza.apache.org/
|
||||||
|
[4]: https://hadoop.apache.org/
|
||||||
|
[5]: http://mesos.apache.org/
|
||||||
|
[6]: https://flink.apache.org/
|
||||||
|
[7]: https://beam.apache.org
|
||||||
|
[8]: https://github.com/swimos/swim
|
||||||
|
[9]: https://hazelcast.com/
|
@ -0,0 +1,152 @@
|
|||||||
|
[#]: collector: (lujun9972)
|
||||||
|
[#]: translator: ( )
|
||||||
|
[#]: reviewer: ( )
|
||||||
|
[#]: publisher: ( )
|
||||||
|
[#]: url: ( )
|
||||||
|
[#]: subject: (Revive your RSS feed with Newsboat in the Linux terminal)
|
||||||
|
[#]: via: (https://opensource.com/article/20/2/newsboat)
|
||||||
|
[#]: author: (Scott Nesbitt https://opensource.com/users/scottnesbitt)
|
||||||
|
|
||||||
|
Revive your RSS feed with Newsboat in the Linux terminal
|
||||||
|
======
|
||||||
|
Newsboat is an excellent RSS reader, whether you need a basic set of
|
||||||
|
features or want your application to do a whole lot more.
|
||||||
|
![Boat on the ocean with Creative Commons sail][1]
|
||||||
|
|
||||||
|
Psst. Word on the web is that RSS died in 2013. That's when Google pulled the plug on Google Reader.
|
||||||
|
|
||||||
|
Don't believe everything that you hear. RSS is alive. It's well. It's still a great way to choose the information you want to read without algorithms making the decision for you. All you need is the [right feed reader][2].
|
||||||
|
|
||||||
|
Back in January, Opensource.com Correspondent [Kevin Sonney][3] introduced a nifty terminal RSS reader [called Newsboat][4]. In his article, Kevin scratched Newsboat's surface. I figured it was time to take a deeper dive into what Newsboat can do.
|
||||||
|
|
||||||
|
### Adding RSS feeds to Newsboat
|
||||||
|
|
||||||
|
As Kevin writes, "installing Newsboat is pretty easy since it is included with most distributions (and Homebrew on macOS)." You can, as Kevin also notes, import a [file containing RSS feeds][5] from another reader. If this is your first kick at the RSS can or it's been a while since you've used an RSS reader, chances are you don't have one of those files handy.
|
||||||
|
|
||||||
|
Not to worry. You just need to do some copying and pasting. Go to the folder **.newsboat** in your **/home** directory. Once you're there, open the file **urls** in a text editor. Then, go to the websites you want to read, find the links to their RSS feeds, and copy and paste them into the **urls** file.
|
||||||
|
|
||||||
|
![Newsboat urls file][6]
|
||||||
|
|
||||||
|
Start Newsboat, and you're ready to get reading.
|
||||||
|
|
||||||
|
### Reading your feeds
|
||||||
|
|
||||||
|
As Kevin Sonney points out, you refresh your feeds by pressing the **r** or **R** keys on your keyboard. To read the articles from a feed, press **Enter** to open that feed and scroll down the list. Then, press **Enter** to read an item.
|
||||||
|
|
||||||
|
![Newsboat reading][7]
|
||||||
|
|
||||||
|
Return to the list of articles by pressing **q**. Press **q** again to return to your list of feeds.
|
||||||
|
|
||||||
|
Every so often, you might run into a feed that shows just part of an article. That can be annoying. To get the full article, press **o** to open it in your desktop's default web browser. On my desktop, for example, that's Firefox. You can change the browser Newsboat works with; I'll explain that below.
|
||||||
|
|
||||||
|
### Following links
|
||||||
|
|
||||||
|
Hyperlinking has been a staple of the web since its beginnings at CERN in the early 1990s. It's hard to find an article published online that doesn't contain at least a couple of links that point elsewhere.
|
||||||
|
|
||||||
|
Instead of leaving links embedded in an article or post, Newsboat gathers them into a numbered list at the end of the article or post.
|
||||||
|
|
||||||
|
![Hyperlinks in Newsboat][8]
|
||||||
|
|
||||||
|
To follow a link, press the number beside it. In the screenshot above, you'd press **4** to open the link to the homepage of one of the contributors to that article. The link, as you've probably guessed, opens in your default browser.
|
||||||
|
|
||||||
|
### Using Newsboat as a client for other feed readers
|
||||||
|
|
||||||
|
You might use a web-based feed reader, but might also want to read your RSS feeds in something a bit more minimal on your desktop. Newsboat can do that.
|
||||||
|
|
||||||
|
It works with several feed readers, including The Old Reader, Inoreader, Newsblur, Tiny Tiny RSS, FeedHQ, and the newsreader apps for [ownCloud][9] and [Nextcloud][10]. Before you can read feeds from any of them, you'll need to do a little work.
|
||||||
|
|
||||||
|
Go back to the **.newsboat** folder in your **/home** directory and create a file named **config**. Then add the settings that hook Newsboat into one of the RSS readers it supports. You can find more information about the specific settings for each reader in [Newsboat's documentation][11].
|
||||||
|
|
||||||
|
Here's an example of the settings I use to connect Newsboat with the newsreader app in my instance of Nextcloud:
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
urls-source "ocnews"
|
||||||
|
ocnews-url "<https://my.nextcloud.instance>"
|
||||||
|
ocnews-login "myUserName"
|
||||||
|
ocnews-password "NotTellingYouThat!"
|
||||||
|
```
|
||||||
|
|
||||||
|
I've tested this with Nextcloud, The Old Reader, Inoreader, and Newsblur. Newsboat worked seamlessly with all of them.
|
||||||
|
|
||||||
|
![Newsboat with The Old Reader][12]
|
||||||
|
|
||||||
|
### Other useful configuration tricks
|
||||||
|
|
||||||
|
You can really unleash Newsboat's power and flexibility by tapping into [its configuration options][13]. That includes changing text colors, the order Newsboat sorts feeds, where it saves articles, the length of time Newsboat keeps articles, and more.
|
||||||
|
|
||||||
|
Below are a few of the options I've added to my configuration file.
|
||||||
|
|
||||||
|
#### Change Newsboat's default browser
|
||||||
|
|
||||||
|
As I mentioned a few paragraphs back, Newsboat opens articles in your default graphical web browser. If you want to read feeds in a [text-only browser][14] like w3m or ELinks, add this to your Newsboat configuration file:
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
`browser "/path/to/browser %u"`
|
||||||
|
```
|
||||||
|
|
||||||
|
In my configuration file, I've set w3m up as my browser:
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
`browser "/usr/bin/w3m %u"`
|
||||||
|
```
|
||||||
|
|
||||||
|
![Newsboat with w3m][15]
|
||||||
|
|
||||||
|
#### Remove read articles
|
||||||
|
|
||||||
|
I like an uncluttered RSS feed. That means getting rid of articles I've already read. Add this setting to the configuration file to have Newsboat do that automatically:
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
`show-read-feeds no`
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Refresh feeds at launch
|
||||||
|
|
||||||
|
Life gets busy. Sometimes, I go a day or two without checking my RSS feeds. That means having to refresh them after I fire Newsboat up. Sure, I can press **r** or **R**, but why not have the application do it for me? I've added this setting to my configuration file to have Newsboat refresh all of my feeds when I launch it:
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
`refresh-on-startup yes`
|
||||||
|
```
|
||||||
|
|
||||||
|
If you have a lot of feeds, it can take a while to refresh them. I have around 80 feeds, and it takes over a minute to get new content from all of them.
|
||||||
|
|
||||||
|
### Is that everything?
|
||||||
|
|
||||||
|
Not even close. In addition to all of its configuration options, Newsboat also has a number of command-line switches you can use when you fire it up. Read more about them in the [documentation][16].
|
||||||
|
|
||||||
|
On the surface, Newsboat is simple. But a lot of power and flexibility hides under its hood. That makes Newsboat an excellent RSS reader for anyone who needs a basic set of features or for someone who needs their RSS reader to do a whole lot more.
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
via: https://opensource.com/article/20/2/newsboat
|
||||||
|
|
||||||
|
作者:[Scott Nesbitt][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/scottnesbitt
|
||||||
|
[b]: https://github.com/lujun9972
|
||||||
|
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/CreativeCommons_ideas_520x292_1112JS.png?itok=otei0vKb (Boat on the ocean with Creative Commons sail)
|
||||||
|
[2]: https://opensource.com/article/17/3/rss-feed-readers
|
||||||
|
[3]: https://opensource.com/users/ksonney
|
||||||
|
[4]: https://opensource.com/article/20/1/open-source-rss-feed-reader
|
||||||
|
[5]: https://en.wikipedia.org/wiki/OPML
|
||||||
|
[6]: https://opensource.com/sites/default/files/uploads/newsboat-urls-file.png (Newsboat urls file)
|
||||||
|
[7]: https://opensource.com/sites/default/files/uploads/newsboat-reading.png (Newsboat reading)
|
||||||
|
[8]: https://opensource.com/sites/default/files/uploads/newsboat-links.png (Hyperlinks in Newsboat)
|
||||||
|
[9]: https://github.com/owncloudarchive/news
|
||||||
|
[10]: https://github.com/nextcloud/news
|
||||||
|
[11]: https://newsboat.org/releases/2.18/docs/newsboat.html#_newsboat_as_a_client_for_newsreading_services
|
||||||
|
[12]: https://opensource.com/sites/default/files/uploads/newsboat-oldreader.png (Newsboat with The Old Reader)
|
||||||
|
[13]: https://newsboat.org/releases/2.18/docs/newsboat.html#_example_configuration
|
||||||
|
[14]: https://opensource.com/article/16/12/web-browsers-linux-command-line
|
||||||
|
[15]: https://opensource.com/sites/default/files/uploads/newsboat-read-with-w3m.png (Newsboat with w3m)
|
||||||
|
[16]: https://newsboat.org/releases/2.18/docs/newsboat.html
|
Loading…
Reference in New Issue
Block a user