Merge pull request #6 from LCTT/master

update
This commit is contained in:
littlebirdnest 2022-09-22 10:37:22 +08:00 committed by GitHub
commit 86bf337f56
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 1044 additions and 417 deletions

View File

@ -0,0 +1,161 @@
[#]: subject: (Why FreeDOS has 16 colors)
[#]: via: (https://opensource.com/article/21/6/freedos-sixteen-colors)
[#]: author: (Jim Hall https://opensource.com/users/jim-hall)
[#]: collector: (lujun9972)
[#]: translator: (gpchn)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-15054-1.html)
FreeDOS 的 16 种颜色的由来
======
> 为什么文本只能使用这些有限的颜色显示,为什么 FreeDOS 使用这些颜色和阴影,而不是其他颜色?答案就像技术中的许多事情一样,历史原因。
![](https://img.linux.net.cn/data/attachment/album/202209/21/171602vhhj99xkxshxbbvk.jpg)
如果你仔细了解过 FreeDOS你可能已经注意到文本使用有限的颜色范围 —— 16 种文本颜色和 8 种背景颜色。这类似于 Linux 显示文本颜色的方式 —— 你或许能够在 Linux 终端中更改 _文本颜色_,但你仍然只能使用 16 种文本颜色和 8 种背景颜色。
![终端颜色][2]
*DOS 文本有 16 种颜色和 8 种背景颜色(吉姆·霍尔,[CC-BY SA 4.0][3]*
为什么文本只能使用这些有限的颜色显示,为什么 FreeDOS 使用这些颜色和阴影,而不是其他颜色?
答案就像技术中的许多事情一样,历史原因。
### PC 色彩的由来
为了解释为什么文本只有 16 种颜色,让我给你讲一个关于第一台 IBM 个人计算机的故事。这个故事的部分内容可能有些杜撰,但基本内容已经足够接近。
IBM 于 1981 年发布了<ruby>个人计算机<rt>Personal Computer</rt></ruby> 5150“IBM PC”。该 PC 使用了一个简单的监视器屏幕,以绿色显示文本。由于此显示器仅适用于一种颜色,因此被称为 <ruby>单色<rt>monochrome</rt></ruby>“IBM 5151 单色显示器”,搭载 IBM <ruby>单色显示适配器<rt>Monochrome Display Adapter</rt></ruby>,即 MDA
同年IBM 发布了 PC 的更新版本,带来了惊人的技术成就 —— 颜色!新的 IBM 5153 彩色显示器依赖于新的 IBM <ruby>彩色图形适配器<rt>Color Graphics Adapter</rt></ruby>CGA。正是由于这个原始的 CGA所有的 DOS 文本都继承了它们的颜色。
但在我们讨论那一部分之前,我们首先需要了解一些关于颜色的东西。当我们谈论计算机屏幕上的颜色时,我们谈论的是混合 _三原色_(红色、绿色和蓝色)的不同值。你可以将不同级别(“亮度”)的红光、绿光和蓝光混合在一起,以创建几乎任何颜色。混合红色和蓝色光,你会得到洋红色。混合蓝色和绿色,你会得到青色或浅绿色。均匀地混合所有颜色,你会得到白色。没有任何浅色,你会看到黑色(没有颜色)。
![三原色][4]
*混合红色、绿色和蓝色光以获得不同的颜色(吉姆·霍尔,[CC-BY SA 4.0][3]*
IBM 5153 彩色显示器通过在<ruby>阴极射线管<rt>cathode ray tube</rt></ruby>CRT上点亮微小的红色、绿色和蓝色光点来向用户呈现颜色。这些小点排列得非常紧密并以红色、绿色和蓝色的三色点组成一个“像素”的模式排列。通过控制同时点亮哪些荧光点IBM 5153 彩色显示器可以显示不同颜色的像素。
![CRT 像素][5]
*每个红色、绿色和蓝色三元组都是一个像素(吉姆·霍尔,[CC-BY SA 4.0][3]*
顺便说一句,即使是现代显示器也使用这种红色、绿色和蓝色点的组合来表示颜色。现代计算机的不同之处在于,每个像素都使用红色、绿色和蓝色 LED 灯(通常并排排列),而不是微小的荧光点。计算机可以打开或关闭每个 LED 灯,以混合每个像素中的红色、绿色和蓝色。
![液晶像素][6]
*每个红色、绿色和蓝色三元组都是一个像素(吉姆·霍尔,[CC-BY SA 4.0][3]*
### 定义 CGA 颜色
IBM 工程师意识到他们可以通过混合红色、绿色和蓝色像素来显示多种颜色。在最简单的情况下,你可以假设单个像素中的每个红色、绿色和蓝色点要么“开”,要么“关”。正如任何计算机程序员都会告诉你的那样,你可以将“开”和“关”表示为二进制 —— 11 = 开)和 00 = 关)。
用 1 或 0 表示红色、绿色和蓝色意味着你可以组合多达八种颜色,从 000红色、绿色和蓝色都关闭到 111红色、绿色和蓝色都打开。请注意位模式类似于“RGB”因此 RGB=001 是蓝色的只有蓝色是打开的RGB=011 是青色的(绿色和蓝色都打开了):
| 颜色 | 代码 | 名称 |
| --- | --- | --- |
| <span style="background-color:black;"> </span> | 000 | 黑 |
| <span style="background-color:blue;"> </span> | 001 | 蓝 |
| <span style="background-color:green;"> </span> | 010 | 绿 |
| <span style="background-color:cyan;"> </span> | 011 | 青 |
| <span style="background-color:red;"> </span> | 100 | 红 |
| <span style="background-color:magenta;"> </span> | 101 | 洋红 |
| <span style="background-color:yellow;"> </span> | 110 | 黄 |
| <span style="background-color:white;"> </span> | 111 | 白 |
但这只是最简单的情况。一位特别聪明的 IBM 工程师意识到,只需再添加一点,你就可以将颜色数量从 8 种颜色增加到 16 种。因此,我们可以使用像 iRGB 这样的位模式,而不是像 RGB 这样的位模式。我们将把这个额外的“i”位称为“强度”位因为如果我们将“强度”位设置为 1那么我们将在全亮度下点亮红色、绿色和蓝色如果“强度”位为 0关闭我们可以使用一些中级亮度。
有了这个简单的修复程序,现在 CGA 可以显示 16 种颜色为了简单起见IBM 工程师将高强度颜色称为常规颜色名称的“明亮”版本。因此,“红色”与“亮红色”配对,“洋红色”与“亮洋红色”配对。
| 颜色 | 代码 | 名称 | 颜色 | 代码 | 名称 |
| :----: | :----: | :----: | :----: | :----: | :----: |
| <span style="background-color:#000;"> </span> | 0000 | 黑 | <span style="background-color:#000;"> </span> | 1000 | 亮黑 |
| <span style="background-color:#007;"> </span> | 0001 | 蓝 | <span style="background-color:#00F;"> </span> | 1001 | 亮蓝 |
| <span style="background-color:#070;"> </span> | 0010 | 绿 | <span style="background-color:#0F0;"> </span> | 1010 | 亮绿 |
| <span style="background-color:#077;"> </span> | 0011 | 青 | <span style="background-color:#0FF;"> </span> | 1011 | 亮青 |
| <span style="background-color:#700;"> </span> | 0100 | 红 | <span style="background-color:#F00;"> </span> | 1100 | 亮红 |
| <span style="background-color:#707;"> </span> | 0101 | 洋红 | <span style="background-color:#F0F;"> </span> | 1101 | 亮洋红 |
| <span style="background-color:#770;"> </span> | 0110 | 黄 | <span style="background-color:#FF0;"> </span> | 1110 | 亮黄 |
| <span style="background-color:#777;"> </span> | 0111 | 白 | <span style="background-color:#FFF;"> </span> | 1111 | 亮白 |
哦不,等等!这实际上不是十六种颜色。如果你注意到 iRGB=0000黑色和 iRGB=1000亮黑色它们都是相同的 _黑色_。没有颜色可以“亮”,所以它们都是普通的黑色。这意味着我们只有 15 种颜色,而不是我们希望的 16 种颜色。
但 IBM 有聪明的工程师为他们工作,他们意识到如何解决这个问题以获得 16 种颜色。IBM 实际上没有实现直接的 RGB 到 iRGB而是实现了 _类_ iRGB 方案。随着这一变化IBM 为每个光点设置了四个亮度级别完全关闭、三分之一亮度、三分之二亮度和全亮度。如果“亮度”位被关闭那么每个红色、绿色和蓝色光点将以三分之二的亮度点亮。如果你打开“亮度”位RGB 颜色中的所有 0 都将以三分之一的亮度点亮,而所有 1 都将以全亮度点亮。
让我用另一种方式向你描述这一点,使用 Web 颜色代码表示。如果你熟悉 HTML 颜色,你可能知道你可以使用 `#RGB` 表示颜色,其中 RGB 表示红色、绿色和蓝色值的组合,每个值都在十六进制值 0 到 F 之间。因此,使用 IBM 修改后的 iRGB 定义iRGB=0001 是 #00a蓝色iRGB=1001 是 #55f亮蓝色因为对于高亮度颜色RGB=001 中的所有零点都以三分之一的亮度点亮0 到 F 刻度上的“5”左右RGB=001 中的所有零点都以三分之二的亮度点亮0 到 F刻度上的“A”
| 颜色 | 代码 | 名称 | 颜色 | 代码 | 名称 |
| :----: | :----: | :----: | :----: | :----: | :----: |
| <span style="background-color:#000;"> </span> | 0000 | 黑 | <span style="background-color:#555;"> </span> | 1000 | 亮黑 |
| <span style="background-color:#00A;"> </span> | 0001 | 蓝 | <span style="background-color:#55F;"> </span> | 1001 | 亮蓝 |
| <span style="background-color:#0A0;"> </span> | 0010 | 绿 | <span style="background-color:#5F5;"> </span> | 1010 | 亮绿 |
| <span style="background-color:#0AA;"> </span> | 0011 | 青 | <span style="background-color:#5FF;"> </span> | 1011 | 亮青 |
| <span style="background-color:#A00;"> </span> | 0100 | 红 | <span style="background-color:#F55;"> </span> | 1100 | 亮红 |
| <span style="background-color:#A0A;"> </span> | 0101 | 洋红 | <span style="background-color:#F5F;"> </span> | 1101 | 亮洋红 |
| <span style="background-color:#AA0;"> </span> | 0110 | 黄 | <span style="background-color:#FF5;"> </span> | 1110 | 亮黄 |
| <span style="background-color:#AAA;"> </span> | 0111 | 白 | <span style="background-color:#FFF;"> </span> | 1111 | 亮白 |
有了这些颜色,我们终于完成了!我们拥有从 iRGB=0000黑色到 iRGB=1111亮白色以及介于两者之间的所有颜色的全光谱。就像彩虹般的颜色这很漂亮。
除了……不,等等,这里有问题!我们实际上还不能复制彩虹的所有颜色。我们在小学学到的方便的助记符是 ROYGBIV它可以帮助我们记住彩虹的颜色有红色、橙色、黄色、绿色、蓝色、靛蓝和紫色。我们修改后的 iRGB 配色方案包括红色、黄色、绿色和蓝色——我们可以将其“伪造”为靛蓝和紫色,但是我们缺少橙色。遭了!
![彩虹][7]
*一条美丽的彩虹——不幸的是它含有橙色。([Paweł Fijałkowski][8],公共)*
为了解决这个问题,聪明的 IBM 工程师对 RGB=110 做了最后的修复。高强度颜色iRGB=1110以全亮度点亮红色和绿色荧光粉点以产生黄色但是在低亮度颜色iRGB=0110他们以三分之二的亮度点亮红色以三分之一的亮度点亮绿色。这将 iRGB=0110 变成了橙色——尽管它后来被称为“棕色”,因为 IBM 不得不在某处弄乱标准名称。
| 颜色 | 代码 | 名称 | 颜色 | 代码 | 名称 |
| :----: | :----: | :----: | :----: | :----: | :----: |
| <span style="background-color:#000;"> </span> | 0000 | 黑 | <span style="background-color:#555;"> </span> | 1000 | 亮黑 |
| <span style="background-color:#00A;"> </span> | 0001 | 蓝 | <span style="background-color:#55F;"> </span> | 1001 | 亮蓝 |
| <span style="background-color:#0A0;"> </span> | 0010 | 绿 | <span style="background-color:#5F5;"> </span> | 1010 | 亮绿 |
| <span style="background-color:#0AA;"> </span> | 0011 | 青 | <span style="background-color:#5FF;"> </span> | 1011 | 亮青 |
| <span style="background-color:#A00;"> </span> | 0100 | 红 | <span style="background-color:#F55;"> </span> | 1100 | 亮红 |
| <span style="background-color:#A0A;"> </span> | 0101 | 洋红 | <span style="background-color:#F5F;"> </span> | 1101 | 亮洋红 |
| <span style="background-color:#A50;"> </span> | **0110** | **棕** | <span style="background-color:#FF5;"> </span> | 1110 | 黄 |
| <span style="background-color:#AAA;"> </span> | 0111 | 白 | <span style="background-color:#FFF;"> </span> | 1111 | 亮白 |
这就是 CGA 以及扩展的 DOS 获得十六种颜色的方式!如果你好奇,这也是为什么会有“亮黑色”的原因,即使它只是一种灰色阴影。
### 表示颜色(位和字节)
但是你可能想知道:为什么 DOS 可以显示 16 种文本颜色,却只能显示 8 种背景颜色?为此,我们需要快速了解计算机如何将颜色信息传递给 CGA 卡。
简而言之CGA 卡希望将每个字符的文本颜色和背景颜色编码在一个字节数据包中,一共八位。那么八位是从哪里来的呢?
我们刚刚了解了 iRGB四位如何生成十六种颜色。文本颜色使用 iRGB 四位背景颜色仅限于八种低强度颜色RGB三位加起来只有七位。丢失的第八位在哪里
最后一个位可能是为 DOS 时代最重要的用户界面元素保留的 —— 闪烁文本。虽然闪烁的文本在如今可能很烦人,但在整个 1980 年代初期,闪烁的文本是表示错误消息等关键信息的友好方式。
将这个“闪烁”位添加到三个背景颜色位RGB和四个文本颜色位iRGB中会产生八个位或一个字节计算机喜欢以完整字节为单位进行计数这使其成为将颜色和闪烁信息传输到计算机的便捷方式。
因此,表示颜色(和闪烁)的完整字节是 `Bbbbffff`,其中 `ffff` 是文本颜色的 iRGB 位模式(从 0 到 15`bbb` 是低强度的 RGB 位模式背景颜色(从 0 到 7`B` 是“闪烁”位。
十六种文本颜色和八种背景颜色的限制一直持续到今天。当然DOS 坚持使用这种颜色组合,但即使是像 GNOME 终端这样的 Linux 终端仿真器也仍然受限于 16 种文本颜色和 8 种背景颜色。当然Linux 终端可能允许你更改使用的特定颜色,但你仍然限于十六种文本颜色和八种背景颜色。为此,你要感谢 DOS 和最初的 IBM PC。别客气
--------------------------------------------------------------------------------
via: https://opensource.com/article/21/6/freedos-sixteen-colors
作者:[Jim Hall][a]
选题:[lujun9972][b]
译者:[gpchn](https://github.com/gpchn)
校对:[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/1980s-computer-yearbook.png?itok=eGOYEKK- (Person typing on a 1980's computer)
[2]: https://opensource.com/sites/default/files/uploads/16colors.png (DOS text comes in 16 colors and 8 background colors)
[3]: https://creativecommons.org/licenses/by-sa/4.0/
[4]: https://opensource.com/sites/default/files/uploads/rgb.svg_.png (Mix red, green, and blue light to get different colors)
[5]: https://opensource.com/sites/default/files/uploads/crt.svg_.png (Each red, green, and blue triad is a single pixel)
[6]: https://opensource.com/sites/default/files/uploads/lcd.svg_.png (Each red, green, and blue triad is a single pixel)
[7]: https://opensource.com/sites/default/files/uploads/rainbow.jpg (A beautiful rainbow - which unfortunately contains orange )
[8]: https://www.pexels.com/photo/landscape-photography-of-field-with-wind-mill-with-rainbow-1253748/

View File

@ -0,0 +1,105 @@
[#]: subject: "LibreOffice is Available for $8.99 on Mac App Store: Here's Why!"
[#]: via: "https://news.itsfoss.com/libreoffice-mac-os-store/"
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
LibreOffice is Available for $8.99 on Mac App Store: Here's Why!
======
LibreOffice is available to purchase from Mac App Store. But isn't it a free tool? Let's find out why!
![LibreOffice is Available for $8.99 on Mac App Store: Here's Why!][1]
LibreOffice is a free and open-source office suite available across multiple platforms.
So, it will always remain among the best free alternatives to Microsoft Office.
If that is the case, **why am I talking about purchasing LibreOffice here?**
### The Document Foundation Intends to Market the Project for Better Funding
The Document Foundation has been trying to improve the monetization and marketing strategies to encourage people to help support the development of LibreOffice.
Of course, the enterprise edition is one of the best ways they manage to do it.
But how can this opportunity be extended to its end users by providing similar perks?
**One of the easiest ways** is to make LibreOffice through proprietary sale channels like Mac App Store.
The Document Foundation recently [announced][4] making LibreOffice available on Mac App Store; here's what they mentioned:
> TDF releasing on the Mac App Store is an evolution over the previous situation, which reflects the projects new marketing strategy: The Document Foundation is focused on the release of the Community version, while ecosystem companies are focused on a value-added long-term supported versions targeted at enterprises.
Many users trust and rely on the official store of their platform. So, making LibreOffice available at the official software store gives users convenience. You can automatically update LibreOffice to its latest stable version without downloading it separately.
![libreoffice mac app store][5]
To avail of the convenience of downloading LibreOffice from the Apple Mac Store, you need to purchase it for a one-time fee.
It is available for **$8.99** on macOS App Store.
> You can still download LibreOffice for macOS for FREE from [LibreOffice website][6].
#### Wasn't it already available on Mac App Store?
![mac app store collabora][7]
Well, yes, and no.
Collabora Office (the enterprise version based on LibreOffice) is available on the Mac App Store for **$8.99**.
While it is based on LibreOffice, it is not precisely the LibreOffice community version. So, now, The Documentation Foundation has made the LibreOffice community version available on the Mac App Store.
In the announcement, they also mention:
> “We are grateful to Collabora for having supported LibreOffice on Apples Mac App Stores for quite a long time”
>
> - Italo Vignoli, LibreOffice Marketing
#### How does this fee help LibreOffice?
LibreOffice is a massive open-source project as of now. It is not surprising why many Linux distributions include it by default, and several education institutes have decided to switch to it by ditching Microsoft Office.
Of course, it may not be perfect in every sense. But, it is making good progress and should fit the likes of many users who want essential features in a document, spreadsheet, or presentation program.
So, the fee will help support the project by covering the costs involved in maintaining it and further generating revenue to help contributors and people working with The Document Foundation.
### LibreOffice on Microsoft Store?
![][8]
LibreOffice is not yet available directly on the Microsoft Store.
You can purchase the Collabora Office on the Microsoft Store for $14.99. But, The Document Foundation has yet to make an official community version available.
There is also [Allo Office][9], previously known as LibreOffice Vanilla.
Maybe after making it available on the Mac App Store. They might bring it in for the Microsoft Store.
💬 *What do you think about purchasing LibreOffice from Mac App Store?*
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/libreoffice-mac-os-store/
作者:[Ankush Das][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://news.itsfoss.com/author/ankush/
[b]: https://github.com/lkxed
[1]: https://news.itsfoss.com/content/images/size/w1200/2022/09/libreoffice-mac-app-store.png
[2]: https://itsfoss.com/best-free-open-source-alternatives-microsoft-office/
[3]: https://itsfoss.com/best-free-open-source-alternatives-microsoft-office/
[4]: https://blog.documentfoundation.org/blog/2022/09/19/the-document-foundation-releases-libreoffice-on-apples-mac-app-store/
[5]: https://news.itsfoss.com/content/images/2022/09/libreoffice-mac-1.jpg
[6]: https://www.libreoffice.org/download/download-libreoffice/
[7]: https://news.itsfoss.com/content/images/2022/09/collabora-mac.webp
[8]: https://news.itsfoss.com/content/images/2022/09/collabora-windows.jpg
[9]: https://apps.microsoft.com/store/detail/allooffice/9MWJQ9TX63F9

View File

@ -0,0 +1,77 @@
[#]: subject: "Wow! Rust-based Redox OS Gets an Anonymous Donation of $390,000 in Cryptocurrency"
[#]: via: "https://news.itsfoss.com/redox-os-anonymous-donation/"
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Wow! Rust-based Redox OS Gets an Anonymous Donation of $390,000 in Cryptocurrency
======
Redox OS just got a massive anonymous donation. What will it be used for? Something exciting!
![Wow! Rust-based Redox OS Gets an Anonymous Donation of $390,000 in Cryptocurrency][1]
[Redox OS][2] is a Unix-like operating system written in Rust.
The project was launched in 2015 by Jeremy Soller, popularly recognized as the Principal Engineer at [System76][3] and a maintainer for [Pop!_OS][4].
We also covered its last release earlier this year:
[Rust-based Redox OS 0.7.0 Arrives with Enhanced Hardware Support][5]
While the update involved improvements that allowed it to boot on more hardware, it may not be a replacement daily driver for most users.
Nevertheless, it is an exciting project to keep an eye on.
**And things got more exciting for it after it received an anonymous donation**.
🤯 Someone just sent **299 Ethereum** to Redux OS's donation address, equivalent to nearly **$3,90,000** (with ups and downs in the cryptocurrency market).
Well, that is a lot of money!
![A Video from YouTube][7]
As per Jeremy's last tweet, he hasn't decided immediately what to do with it.
> An anonymous donor just sent 299 Ether (equivalent to 393,000 USD) to the [@redox_os][8] donation address. Both this address and transaction are public. I have no idea what to do with a donation of this size but will have more details soon after some research.[https://t.co/f3yBDghWSh][9]
However, the replies to the tweet give us some good suggestions.
Some suggest donating it to the folks responsible for Rust language, and some suggest using the money to sponsor learning rust and OS development.
He can surely use it to scale up Redox OS or anything else that needs that resource.
At the end of the day, for people who want more Rust-based stuff, this could be indirectly a good thing with whatever Jeremy chooses to do.
Or, maybe buy a Buggati with a Redox OS logo on it? Well, some Twitter users have had hilarious replies to this incident! 😂
> This is not the first time an open-source project received a significant cryptocurrency donation. The Apache Software Foundation [received bitcoins][13] valued at $1 M in 2018.
I shall update this article when Jeremy decides to share more details on the donation and what he plans to do with it.
💬 *What do you think about the anonymous donation to Redox OS? What would you do if you got that donation? Let us know your thoughts in the comments box below.*
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/redox-os-anonymous-donation/
作者:[Ankush Das][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://news.itsfoss.com/author/ankush/
[b]: https://github.com/lkxed
[1]: https://news.itsfoss.com/content/images/size/w1200/2022/09/donor-sends-ether-to-redux-os.png
[2]: https://www.redox-os.org/
[3]: https://system76.com/
[4]: https://pop.system76.com/
[5]: https://news.itsfoss.com/redox-os-0-7-0-release/
[7]: https://tenor.com/embed/17544086
[8]: https://twitter.com/redox_os?ref_src=twsrc%5Etfw
[9]: https://t.co/f3yBDghWSh
[13]: https://news.apache.org/foundation/entry/the-apache-software-foundation-receives

View File

@ -1,123 +0,0 @@
[#]: subject: "Komikku: A Free and Open-Source Manga Reader for Linux"
[#]: via: "https://itsfoss.com/komikku-manga-reader/"
[#]: author: "Anuj Sharma https://itsfoss.com/author/anuj/"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Komikku: A Free and Open-Source Manga Reader for Linux
======
Love reading comic books? There are [plenty of comic book readers available for Linux][1].
But what about something tailored for Japanese comic books (Manga)?
I think I came across the perfect app suitable for reading Manga, organizing them, and downloading them for offline use as well. The app I discovered recently is called **Kommiku**.
Let me mention the key highlights of this app and help you get started with it on Linux.
### Komikku: A Linux-only Manga Reader
![Komikku UI][2]
Komikku is an open-source manga reader available as a Linux-only application.
Primarily, it is tailored to go well with the GNOME desktop environment, but you can use it on Linux distributions running [other desktop environments][3].
Many PDF or [E-book readers][4] like Bookworm, Calibre, and Foliate support the Comic book format.
However, Komikku users get more features to have a good experience for reading manga.
![Komikku online servers list][5]
For instance, Komikku can be used to view Manga online and offline. Furthermore, you can download it from supported servers.
### Features of Komikku
![komikku reader][6]
Some of the best functionalities of Komikku include:
* Online reading from dozens of supported servers.
* Offline reading of downloaded comics.
* Categories to organize your library.
* RTL, LTR, Vertical and Webtoon reading modes.
* Several types of navigation (Keyboard arrow keys, right and left navigation layout via mouse click or tapping (touchpad/touch screen), scroll wheel, and swipe gestures (touchpad and touchscreen).
* Automatic update of comics.
* Automatic download of new chapters.
* Reading history.
* Light and dark themes.
* Adaptive design (able to scale from desktop workstations to mobile phones).
* Keyboard shortcuts.
![Komikku compact view][7]
### Installation
Komikku is available on [Flathub][8]. So, you can get it installed on any Linux distribution.
However, you need to [set up Flatpak and enable Flathub repo on your system][9].
Once you have Flatpak set up on your system, you can search for it through the software center or install it from your terminal.
![Installing Komikku from GNOME Software][10]
To install Komikku using the terminal, type the following command
```
flatpak install flathub info.febvre.Komikku
```
Native packages for Komikku are also available for distributions like Arch Linux and Fedora. Here are the commands to get them installed:
For Arch Linux (available in AUR):
```
yay -Syu komikku
```
For Fedora (available in official repos):
```
sudo dnf install komikku
```
Check out Komikkus source code and the instructions to build it from the source on its [GitLab page][11]. Head to its official webpage to know more about it.
[Download Komikku][12]
### Conclusion
I found Komikku to be very intuitive and clean. Noted that the online servers do not always work, one can expect some hiccups, but managing offline comics and sorting your collection into categories is effortless.
All thanks to **Valéry Febvre**(developer of Komikku) we have another useful Linux app. You can consider donating to the project if you like the application.
*Which comic book reader do you use? Will you give Komikku a try? Kindly let me know your thoughts in the comments below.*
--------------------------------------------------------------------------------
via: https://itsfoss.com/komikku-manga-reader/
作者:[Anuj Sharma][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/anuj/
[b]: https://github.com/lkxed
[1]: https://itsfoss.com/best-comic-book-reader-linux/
[2]: https://itsfoss.com/wp-content/uploads/2022/09/komikku-library.png
[3]: https://itsfoss.com/best-linux-desktop-environments/
[4]: https://itsfoss.com/best-ebook-readers-linux/
[5]: https://itsfoss.com/wp-content/uploads/2022/09/komikku-online-servers.png
[6]: https://itsfoss.com/wp-content/uploads/2022/09/komikku-reader.png
[7]: https://itsfoss.com/wp-content/uploads/2022/09/komikku-mobile-view.png
[8]: https://flathub.org/apps/details/info.febvre.Komikku
[9]: https://itsfoss.com/flatpak-guide/
[10]: https://itsfoss.com/wp-content/uploads/2022/09/install-komikku-gnome-software.png
[11]: https://gitlab.com/valos/Komikku
[12]: https://valos.gitlab.io/Komikku/

View File

@ -1,88 +0,0 @@
[#]: subject: "How I switched from Docker Desktop to Colima"
[#]: via: "https://opensource.com/article/22/9/docker-desktop-colima"
[#]: author: "Michael Anello https://opensource.com/users/ultimike"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
How I switched from Docker Desktop to Colima
======
Colima is a Docker Desktop alternative for macOS and Linux that's now supported by DDEV.
![Getting started with Perlbrew][1]
Image by: freephotocc via Pixabay CC0
[DDEV][2] is an open source tool that makes it simple to get local PHP development environments up and running within minutes. Its powerful and flexible as a result of its per-project environment configurations, which can be extended, version controlled, and shared. In short, DDEV aims to allow development teams to use containers in their workflow without the complexities of bespoke configuration.
DDEV replaces more traditional AMP stack solutions (WAMP, MAMP, XAMPP, and so on) with a flexible, modern, container-based solution. Because it uses containers, DDEV allows each project to use any set of applications, versions of web servers, database servers, search index servers, and other types of software.
In March 2022, the DDEV team [announced support for C][3][olima][4], an open source Docker Desktop replacement for macOS and Linux. [Colima][5] is open source, and by all reports its got [performance gains][6] over its alternative, so using Colima seems like a no-brainer.
### Migrating to Colima
First off, Colima is *almost* a drop-in replacement for Docker Desktop. I say *almost* because some reconfiguration is required when using it for an existing DDEV project. Specifically, databases must be reimported. The fix is to first export your database, then start Colima, then import it. Easy.
Colima requires that either the Docker or [Podman][7] command is installed. On Linux, it also requires Lima.
Docker is installed by default with Docker Desktop for macOS, but its also available as a stand-alone command. If you want to go 100% pure Colima, you can uninstall Docker Desktop for macOS, and install and configure the Docker client independently. [Full installation instructions can be found on the DDEV docs site][8].
![An image of the container technology stack.][9]
Image by: (Mike Anello,CC BY-SA 4.0)
If you choose to keep using both Colima and Docker Desktop, then when issuing docker commands from the command line, you must first specify which container you want to work with. More on this in the next section.
### Install Colima on macOS
I currently have some local projects using Docker, and some using Colima. Once I understood the basics, its not too difficult to switch between them.
1. To get started, install Colima using Homebrew `brew install colima`
2. ddev poweroff (just to be safe)
3. Next, start Colima with `colima start `--cpu` 4 `--memory` 4.` The --cpu and --memory options only have to be done once. After the first time, only `colima start` is necessary.
4. If youre a DDEV user like me, then you can spin up a fresh Drupal 9 site with the usual `ddev` commands (ddev config, ddev start, and so on.) Its recommended to enable DDEVs mutagen functionality to maximize performance.
### Switching between a Colima and Docker Desktop
If youre not ready to switch to Colima wholesale yet, its possible to have both Colima and Docker Desktop installed.
1. First, poweroff ddev:ddev poweroff
2. Then stop Colima: `colima stop`
3. Now run `docker context use `default`` to tell the Docker client which container you want to work with. The name default refers to Docker Desktop for Mac. When `colima start` is run, it automatically switches Docker to the `colima` context.
4. To continue with the default (Docker Desktop) context, use the `ddev start` command.
Technically, starting and stopping Colima isnt necessary, but the `ddev poweroff` command when switching between two contexts is.
Recent versions of Colima revert the Docker context back to `default` when Colima is stopped, so the `docker context use default` command is no longer necessary. Regardless, I still use `docker context show` to verify that either the `default` (Docker Desktop for Mac) or `colima` context is in use. Basically, the term `context` refers to which container provider the Docker client routes commands to.
### Try Colima
Overall, Im liking what I see so far. I havent run into any issues, and Colima-based sites seem a bit snappier (especially when DDEVs Mutagen functionality is enabled). I definitely foresee myself migrating project sites to Colima over the next few weeks.
*This article originally appeared on the* [DrupalEasy blog][10] *and is republished with permission.*
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/9/docker-desktop-colima
作者:[Michael Anello][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/ultimike
[b]: https://github.com/lkxed
[1]: https://opensource.com/sites/default/files/lead-images/coffee_cafe_brew_laptop_desktop.jpg
[2]: https://github.com/drud/ddev
[3]: https://ddev.com/ddev-local/docker-desktop-alternatives-arrive-for-ddev-colima/
[4]: https://ddev.com/ddev-local/docker-desktop-alternatives-arrive-for-ddev-colima/
[5]: https://github.com/abiosoft/colima
[6]: https://ddev.com/ddev-local/docker-desktop-and-colima-benchmarking-on-macos/
[7]: https://opensource.com/article/22/2/start-running-containers
[8]: https://ddev.readthedocs.io/en/stable/users/docker_installation/#macos-installation-colima
[9]: https://opensource.com/sites/default/files/2022-09/docker-desktop-colima.png
[10]: https://www.drupaleasy.com/news

View File

@ -2,7 +2,7 @@
[#]: via: "https://opensource.com/article/22/9/linux-inxi-command"
[#]: author: "Don Watkins https://opensource.com/users/don-watkins"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "

View File

@ -2,7 +2,7 @@
[#]: via: "https://itsfoss.com/atoms-chroot-tool/"
[#]: author: "Ankush Das https://itsfoss.com/author/ankush/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "

View File

@ -0,0 +1,96 @@
[#]: subject: "6 Python interpreters to try in 2022"
[#]: via: "https://opensource.com/article/22/9/python-interpreters-2022"
[#]: author: "Stephan Avenwedde https://opensource.com/users/hansic99"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
6 Python interpreters to try in 2022
======
It could be interesting to see how your code behaves on another interpreter than what you're used to.
![Hands on a keyboard with a Python book][1]
Image by: WOCinTech Chat. Modified by Opensource.com. CC BY-SA 4.0
Python, one of the most popular programming languages, requires an interpreter to execute the instructions defined by the Python code. In contrast to other languages, which compile directly into machine code, its up to the interpreter to read Python code and translate its instructions for the CPU performing the related actions. There are several interpreters out there, and in this article, Ill take a look at a few of them.
### Primer to interpreters
When talking about the Python interpreter, its usually the `/usr/bin/python` binary being referred to. That lets you execute a `.py` file.
However, interpreting is just one task. Before a line of Python code is actually executed on the CPU, these four steps are involved:
1. Lexing - The human-made source code is converted into a sequence of logical entities, the so called lexical tokens.
2. Parsing - In the parser, the lexical tokens are checked in regards of syntax and grammar. The output of the parser is an abstract syntax tree (AST).
3. Compiling - Based on the AST, the compiler creates Python bytecode. The bytecode consists of very basic, platform independent instructions.
4. Interpreting - The interpreter takes the bytecode and performs the specified operations.
As you can see, a lot of steps are required before any real action is taken. It makes sense to take a closer look at the different interpreters.
### 1. CPython
[CPython][2] is the reference implementation of Python and the default on many systems. As the name suggests, CPython is written in C.
As a result, it is possible to [write extensions in C][3] and therefore make the widley used C based library code available to Python. CPython is available on a wide range of platforms including ARM, iOS, and RISC. However, as the reference implementation of the language, CPython is carefully optimized and not focused on speed.
### 2. Pyston
[Pyston][4] is a fork of the CPython interpreter which implements performance optimizations. The project describes itself as a replacement of the standard CPython interpreter for large, real-world applications with a speedup potential up to 30%. Due to the lack of compatible binary packages, Pyston packages must be recompiled during the download process.
### 3. PyPy
[PyPy][5] is a [Just-in-time (JIT)][6] compiler for Python which is written in RPython, a statically typed subset of Python. In contrast to the CPython interpreter, PyPy compiles to machine code which can be directly executed by the CPU. PyPy is the playground for Python developers where they can experiment with new features more easily.
PyPy is faster than the reference CPython implementation. Because of the nature of JIT compiler, only applications that have been running for a long time benefit from caching.  PyPy can act as a replacement for CPython. There is a drawback, though. C-extension modules are mostly supported, but they run slower than a Python one. PyPy extension modules are written in Python (not C) and so the JIT compiler is able to optimized them. As long as your application isn't dependent on incompatible modules, PyPy is a great replacement for CPython. There is a dedicated page on the project website which describes the differences to CPython in detail: [Diffrences between PyPy and CPython][7]
### 4. RustPython
As the name suggest, [RustPython][8] is a Python interpreter written in Rust. Although the Rust programming language is quite new, it has been gaining popularity and is a candidate to be a successor of C and C++. By default, RustPython behaves like the interpreter of CPython but it also has a JIT compiler which can be enabled optionally. Another nice feature is that the Rust toolchain allows you to directly compile to [WebAssembly][9] and also allows you to run the interpreter completely in the browser. A demo of it can be found at [rustpython.github.com/demo][10].
### 5. Stackless Python
[Stackless Python][11] describes itself as an enhanced version of the Python programming language. The project is basically a fork of the CPython interpreter which adds microthreads, channels and a scheduler to the language. Microthreads allow you to structure your code into tasklets which let you run your code in parallel. This approach is comparable to using green threads of the [greenlet][12] module. Channels can be used for bidirectional communication between tasklets. A famous user of Stackless Python is the MMORPG [Eve Online][13].
### 6. Micro Python
[MicroPython][14] is the way to go if you target micro controllers. It is a lean implementation that only requires 16kB of RAM and 256kB of space. Due to the embedded environment which it is intended for, MicroPythons standard library is only a subset of CPythons extensive STL. For developing and testing or as a lightweight alternative, MicroPython also runs on ordinary x86 and x64 machines. MicroPython is available for Linux, Windows, as well as many microcontrollers.
### Performance
By design, Python is an inherently slow language. Depending on the task, there are significant performance differences between the interpreters. To get an overview of which interpreter is the best pick for a certain task, refer to [pybenchmarks.org][15]. An alternative to using an interpreter is to compile Python binary code directly into machine code. [Nuitka][16], for example, is one of those projects which can compile Python code to C code and from C to machine code. The C code is then compiled to machine code using an ordinary C compiler. The topic of Python compilers is quite comprehensive and worth a separate article.
### Summary
Python is a wonderful language for rapid prototyping and automating tasks. Additionally, it is easy to learn and well suited for beginners. If you usually stick with CPython, it could be interesting to see how your code behaves on another interpreter. If you use Fedora, you can easily test a few other interpreters as the package manager already provides the right binaries. Check out [fedora.developer.org][17] for more information.
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/9/python-interpreters-2022
作者:[Stephan Avenwedde][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/hansic99
[b]: https://github.com/lkxed
[1]: https://opensource.com/sites/default/files/lead-images/python-programming-code-keyboard.png
[2]: https://github.com/python/cpython#general-information
[3]: https://opensource.com/article/21/4/cython
[4]: https://github.com/pyston/pyston
[5]: https://foss.heptapod.net/pypy/pypy
[6]: https://en.wikipedia.org/wiki/Just-in-time_compilation
[7]: https://doc.pypy.org/en/latest/cpython_differences.html
[8]: https://github.com/RustPython/RustPython
[9]: https://opensource.com/article/21/3/webassembly-firefox
[10]: https://rustpython.github.io/demo/
[11]: https://github.com/stackless-dev/stackless
[12]: https://pypi.org/project/greenlet/
[13]: https://www.eveonline.com/
[14]: https://micropython.org
[15]: https://pybenchmarks.org/
[16]: https://github.com/Nuitka/Nuitka
[17]: https://developer.fedoraproject.org/tech/languages/python/multiple-pythons.html

View File

@ -0,0 +1,166 @@
[#]: subject: "Garuda Linux: All-Rounder Distro Based on Arch Linux"
[#]: via: "https://www.debugpoint.com/garuda-linux-review-2022/"
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Garuda Linux: All-Rounder Distro Based on Arch Linux
======
A review of the Arch Linux based Garuda Linux, which brings a collection of desktop environments, window managers, and tools for general users and gamers.
Over the years, we [reviewed][1] a couple of Arch-based distros spread across new ones, stables distros and more. Each one of them is a little different from the others. Finally, we review the Garuda Linux in 2022 its our first review of this distro, and we will continue with all the major releases.
![Garuda Linux Desktop (2022)][2]
### What does it offer?
There are many customized and easy-to-use Arch-based Linux distributions available. Every one of those tries to present something new other than just another variant of Arch Linux.
Garuda Linux does offer a few new features compared to others.
Firstly, it **brings almost all popular desktops and window managers** such as KDE, Xfce, GNOME, LXQt-kwin, Cinnamon, Mate, Wayfire, Qtile, i3wm and Sway.
Second, it offers the **default BTRFS file system with zstd compression** for better performance. In addition, it provides the popular **Chaotic-Aur**, which contains a vast collection of pre-compiled binaries from AUR. Moreover, a group of hand-picked themes, icons and cursors give Garuda Linux an edge over the other Arch-based distros.
Finally, its primary selling point is i**ts pre-made for Gaming in Arch Linux** with native apps such as Garuda Gamer and the option for Zen Kernel.
### Garuda Linux Review 2022 Edition
This review is based on Garudas default offering, i.e. Garuda dragonized zen kernel with KDE Plasma (April 28, 2022 iso).
#### Download and Installation
![Garuda Linux boot screen][3]
The download via torrent was fast without any problems. The LIVE boot asks whether you want to boot using open-source or NVIDIA drivers. Finally, the welcome screen is well designed and gives you clear instructions to launch the installer.
Garuda offers **separate ISO files for different desktops** and window managers. Because a massive set of packages pre-loaded in ISO files also gives you the option for the LITE version with KDE Plasma. The LITE versions are the base Garuda Linux without additional theming and packages.
So, pick the one you want for your needs.
Garuda Linux uses **Calamares** installer. The Calamares are not configured heavily, and installation is pretty straightforward. However, Calamares doesnt give you the option to choose the desktop environments or packages. As I mentioned above, it has a separate installer for each of those.
During my test, the installation went smoothly, and it took around 5 minutes to launch the LIVE medium to completion in an Intel i5, 8 GB, SSD configuration. **Its blazing fast, in my opinion.**
#### Look and Feel
After the successful installation, you see a **nice login screen** (SDDM with themes). It is well designed and aligned with Garda Linuxs design patterns.
![The Login screen (SDDM) of Garuda Linux][4]
The KDE Plasma desktop is heavily customized in terms of look in Garuda Linux. Firstly, the Latte dock is well placed with essential shortcuts at the bottom. No unnecessary shortcuts are there, which is nice.
![Garuda Linux Desktop with Latte dock][5]
Second, at the top bar, you get the application menu of KDE Plasma with Latte dock widgets. All the widgets are well placed and necessary for all user bases. By default, the top bar contains NEtSpeed widgets, clipboard and volume controls and the event calendar widget of the Latte dock.
Garuda Linux uses **Kvantum theme engine** with “sweetified-plasma” theme with kvantum-dark application style, giving it its unique look. In addition, the famous BeautyLine icon theme provides the much-needed contrast (as designed) to this distro.
#### Initial Setup and Applications
Firstly, the initial setup gives you several options to quickly configure your desktop before your first use.
A series of terminal-based operations is provided by its welcome applications, such as system upgrades.
The welcome application gives an assorted list of Garuda utilities, ranging from system configurations to changing looks. It includes system cleaner, partition manager, Chaotic-aur managers, Gaming utilities, etc.
Not only that, but it also provides access to Garuda services for its users directly from the desktop. It helps new to advanced users in terms of discovery of the services and features.
![Garuda Welcome App][6]
Now, I would like to highlight two crucial apps in this Garuda Linux review.
First, the **Snapper tool** gives you controls to **create system restore points**using several options. If your system breaks at some point, you can always restore it to a stable state using this utility. This is one of the much-needed applications, considering its a rolling release.
![The Snapper Tools for system restore points][7]
Second, the **Octopi software manager**(similar to synaptic) gives you access to all necessary packages in the Arch repo. You can easily install with one click after verifying the dependencies. Moreover, it also gives you the ability to add and remove Arch repositories via GUI.
Its worth mentioning here that Garuda includes “chaotic-aur” and “multilib” repo by default in addition to the typical “community”, “extra”, and “core” repo.
![Octopi Software Manager][8]
#### The Browser
Garuda doesnt provide a Firefox web browser by default. It includes the **[customized LibreWolf-based FireDragon web browser][9]**, which integrates well with the KDE Plasma desktop.
In addition, UBlock Origin and Dark Reader add-ons are pre-installed in FireDragon. The FireDragon web browser uses Garudas server for searching the web. I am not entirely sure whether it connects to Google in the backend.
![FireDragon Web browser][10]
In addition to the above apps, Garuda uses the advanced Fish shell for command line work. However, LibreOffice and other graphical utilities are not installed by default.
#### Performance and Resource Usage
Garuda is a little resource-heavy, even in an idle state. It consumed around 17% of CPU and RAM usage of approximately 1.2 GB at idle. And if you open more apps, then it will further shoot up.
The htop shows that most of the idle state resources are consumed by KWin. I am not sure why there are five forks of KWin running (perhaps for Kvuntam and other theming). I cross-checked this with a standard Plasma installation, where only one process of KWin runs.
The default KDE Plasma edition of Garuda Linux takes around 6.4 GB of disk space.
![Garuda Linux Performance Idle State][11]
With the above performance metric, you may be unable to run it in low-end hardware. I recommend using an Intel i7 or similar system with at least 8GB of memory for better performance. However, the official system requirement states 4 GB of memory as below.
* 30 GB storage space
* 4 GB RAM
* Video card with OpenGL 3.3 or better
* 64-bit system
Also, it is worth mentioning that other flavours, such as GNOME, Cinnamon etc., should have much better performance metrics.
### Things which grabbed my attention
Garuda requires 30 GB of disk space, which I overlooked before installing. And it also seems a hard requirement, and the Calamares installer is configured that way. So, you must have a minimum of 30 GB of root partition to install this version of Garuda Linux.
Moreover, it takes around 6 GB of disk space for a default install, and I am not sure why the 30 GB limit is too hardcoded in the installer.
![Garuda Linux requires min 30 GB disk space for installation][12]
While Garuda Linux looks wonderful, I feel the default theming and colour contrast are a little “too much”. It feels excellent with high contrast colours on a dark backdrop at first look. But it does look a little “fanboy” type. Although look and feel are subjective, everyone has a different taste.
But always, you can change the themes, icons and whatnot with just a click in KDE Plasma.
### Closing Notes
Finally, to wrap up the Garuda Linux review of 2022, I must say it is one of the Arch-based distros which stands out from the other distros in the same category. Due to its popularity and active participation from the user base, it shall not be discontinued in the future.
From a general users perspective, community help is available via several active channels (which can be accessed via shortcuts from the welcome screen).
If you are keen on gaming, zen Kernel and passionate about Arch Linux, you can choose Garuda. The use case of this distro may vary. I would not recommend it for serious development, projects, media related work.
Then again, Garuda undoubtedly brings unique apps to manage Arch Linux, which is also a plus point. If you need a fancy-looking Arch-based distro to start your Linux journey, its perfect.
That said, you can download Garuda Linux from the [official website][13].
And do let me know your opinion about Garuda in the comment box down below.
--------------------------------------------------------------------------------
via: https://www.debugpoint.com/garuda-linux-review-2022/
作者:[Arindam][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.debugpoint.com/author/admin1/
[b]: https://github.com/lkxed
[1]: https://www.debugpoint.com/tag/linux-distro-review
[2]: https://www.debugpoint.com/wp-content/uploads/2022/05/Garuda-Linux-Desktop-2022.jpg
[3]: https://www.debugpoint.com/wp-content/uploads/2022/05/Garuda-Linux-boot-screen.jpg
[4]: https://www.debugpoint.com/wp-content/uploads/2022/05/The-Login-screen-SDDM-of-Garuda-Linux.jpg
[5]: https://www.debugpoint.com/wp-content/uploads/2022/05/Garuda-Linux-Desktop-with-Latte-dock.jpg
[6]: https://www.debugpoint.com/wp-content/uploads/2022/05/Garuda-Welcome-App.jpg
[7]: https://www.debugpoint.com/wp-content/uploads/2022/05/The-Snapper-Tools-for-system-restore-points.jpg
[8]: https://www.debugpoint.com/wp-content/uploads/2022/05/Octopi-Software-Manager.jpg
[9]: https://github.com/dr460nf1r3/firedragon-browser
[10]: https://www.debugpoint.com/wp-content/uploads/2022/05/FireDragon-Web-browser.jpg
[11]: https://www.debugpoint.com/wp-content/uploads/2022/05/Garuda-Linux-Performance-Idle-State.jpg
[12]: https://www.debugpoint.com/wp-content/uploads/2022/05/Garuda-Linux-requires-min-30-GB-disk-space-for-installation.jpg
[13]: https://garudalinux.org/downloads.html

View File

@ -0,0 +1,111 @@
[#]: subject: "How to Access Android Devices Internal Storage and SD Card in Ubuntu, Linux Mint using Media Transfer Protocol (MTP)"
[#]: via: "https://www.debugpoint.com/how-to-access-android-devices-internal-storage-and-sd-card-in-ubuntu-linux-mint-using-media-transfer-protocol-mtp/"
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
How to Access Android Devices Internal Storage and SD Card in Ubuntu, Linux Mint using Media Transfer Protocol (MTP)
======
This tutorial will show how to access android devices using MTP in Ubuntu and how to access SD card contents.
**This tutorial will show how to access android devices using MTP in Ubuntu and how to access SD card contents.**
MTP, or [media transfer protocol][1], is an extension of the Picture transfer protocol and is implemented in the Android marshmallow version. After the marshmallow update, you cant use the android devices as typical mass storage devices you can just plug in and see the internal storage contents and the SD card contents in a file manager such as in Thunar or GNOME Files. This is due to the OS being unable to determine the MTP devices, and also, a list of supported devices is not yet implemented.
### Steps to access Android Devices in Ubuntu, Linux Mint
* Install [libmtp][2], FUSE file system for MTP enabled devices [mtpfs][3] using below commands
```
sudo apt install go-mtpfs
sudo apt install libmtp
sudo apt install mtpfs mtp-tools
```
* Create a directory in `/media` using the below command and changing the permission to write
```
sudo mkdir /media/MTPdevice
sudo chmod 775 /media/MTPdevice
sudo mtpfs -o allow_other /media/MTPdevice
```
* Plug in your Android device using a USB cable in Ubuntu.
* On your Android device, swipe down from above on the home screen and click Touch for more options.
* In the following menu, select the option “Transfer File (MTP)“.
![MTP Option1][4]
![MTP Option2][5]
* Run the below command in the terminal to find out the device ID etc. You can see the VID and PID in the command output for your device. Note down these two numbers (highlighted in below image).
```
mtp-detect
```
![mtp-detect Command Output][6]
* Open the android rules file using the text editor using the below command.
```
sudo gedit /etc/udev/rules.d/51-android.rules
```
* If you are using the latest Ubuntu, where gedit is not installed, use the below command.
```
sudo gnome-text-editor /etc/udev/rules.d/51-android.rules
```
* Type the below line using your devices VID and PID in the `51-android.rules` file (which you note down in above step).
* Save and close the file.
```
SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", ATTR{idProduct}=="2e82", MODE="0666"
```
* Run the below command to restart the device manager via [systemd][7].
```
sudo service udev restart
```
### Next steps to access contents
* The next steps are mainly needed to access the contents of the external SD card memory of your android device.
* I had to do these because the file manager was NOT showing the contents of the SD card. This is not a solution, though, but it is a workaround which works for most of the users as per this [Google forum post][8] and worked for my Motorola G 2nd Gen with SanDisk SD card. * Safely remove your connected device in Ubuntu. * Turn off the device. Remove the SD card from the device. * Turn on the device without the SD card. * Turn off the device again. * Put the SD card back in and turn on the device again.
* Reboot your Ubuntu machine and plug in your android device.
* Now you can see the contents of your android devices internal storage and the SD card contents.
![MTP Device Contents in Ubuntu][9]
### Conclusion
The above tutorial to access Android device contents in Ubuntu worked on older and new Ubuntu releases with Android devices (Samsung, OnePlus & Motorolla). Try these steps and it might work if you are facing difficulties to access the contents. In my opinion, MTP is very slow compared to good old plug and play options.
--------------------------------------------------------------------------------
via: https://www.debugpoint.com/how-to-access-android-devices-internal-storage-and-sd-card-in-ubuntu-linux-mint-using-media-transfer-protocol-mtp/
作者:[Arindam][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.debugpoint.com/author/admin1/
[b]: https://github.com/lkxed
[1]: https://en.wikipedia.org/wiki/Media_Transfer_Protocol
[2]: https://sourceforge.net/projects/libmtp/
[3]: https://launchpad.net/ubuntu/+source/mtpfs
[4]: https://www.debugpoint.com/wp-content/uploads/2016/03/MTP-Option1.png
[5]: https://www.debugpoint.com/wp-content/uploads/2016/03/MTP-Option2.png
[6]: https://www.debugpoint.com/wp-content/uploads/2016/03/mtp-detect.png
[7]: https://www.debugpoint.com/systemd-systemctl-service/
[8]: https://productforums.google.com/forum/#!topic/nexus/11d21gbWyQo;context-place=topicsearchin/nexus/category$3Aconnecting-to-networks-and-devices%7Csort:relevance%7Cspell:false
[9]: https://www.debugpoint.com/wp-content/uploads/2016/03/MTP-Device-Contents-in-Ubuntu.png

View File

@ -0,0 +1,75 @@
[#]: subject: "My favorite open source alternatives to Notion"
[#]: via: "https://opensource.com/article/22/9/open-source-alternatives-notion"
[#]: author: "Amar Gandhi https://opensource.com/users/amar1723"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
My favorite open source alternatives to Notion
======
There are lots of useful open source note-taking tools out there. Standard Notes and Trilium are designed with your data as the top priority.
![Opensource.com notebook and pen, CC sticker][1]
If you have notes to yourself scattered throughout your hard drive, you might need a notes application to collect and organize your personal reminders. A notes system can help you track ideas, important tasks, and works in progress. A popular application that isn't open source is Notion, but here are two options that respect your privacy and data.
### Standard Notes
Standard Notes is an open source (AGPL 3.0 license) notes application featuring a password manager, a to-do list, and, of course, a great system for writing and storing notes.
One of the most important things about taking notes is finding them again, so organization is critical. Standard Notes uses an intuitive and natural tagging system to help you organize your content. You assign hashtags to each note to classify it.
Standard Notes is extensible through plug-ins. There are plug-ins for LaTeX, Markdown, code snippets, spreadsheets, and more. There's even an option to publish to a blogging platform, should you want to make some of your notes public.
![Standard Notes][2]
Image by: (Amir Gandhi, CC BY-SA 4.0)
Standard Notes also boasts numerous backup options, including email and cloud services. Furthermore, Standard Notes can work on any platform, including Linux, Windows, macOS, and Chrome OS.
#### Self-hosting Standard Notes
Standard Notes can be self-hosted. The developers provide a script that runs the application in a container, making it to run almost anywhere. If you've yet to explore containers, then you can get up to speed with Opensource.com's [introduction to running applications in containers][3].
Another option is to use the hosted version provided by Standard Notes.
The development of Standard Notes can be followed on its [Git repository][4].
### Trilium
Trilium is a notes application that visually resembles Notion in many ways. It can handle various data types, including images, tables, to-do lists, highlighting, mind maps, flowcharts, family trees, code blocks, and more.
Trilium has several mechanisms to help you organize both your thoughts and your notes. You can view a history of recent changes, a global map of all your notes, note categories, or you can search for notes and contents.
![Trilium demo][5]
Image by: (Amir Gandhi, CC BY-SA 4.0)
You can install Trilium as a [Flatpak][6] from [Flathub][7], or you can install it on your own server as a container. Alternatively, you can use Trilium's hosted instance.
### Take note
There are plenty of useful note-taking applications in the open source world, and both Standard Notes and Trilium are designed with your data as the top priority. You can import and export data from these applications, so it's safe to try them out. You'll always have access to your data, so give Standard Notes or Trilium a try.
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/9/open-source-alternatives-notion
作者:[Amar Gandhi][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/amar1723
[b]: https://github.com/lkxed
[1]: https://opensource.com/sites/default/files/lead-images/notebook_pen_cc_anniversary_desk.png
[2]: https://opensource.com/sites/default/files/2022-09/StdNotes.png
[3]: https://opensource.com/article/22/2/start-running-containers
[4]: https://github.com/standardnotes/standalone
[5]: https://opensource.com/sites/default/files/2022-09/trilium.png
[6]: https://opensource.com/article/21/11/install-flatpak-linux
[7]: https://flathub.org/apps/details/com.github.zadam.trilium

View File

@ -1,165 +0,0 @@
[#]: subject: (Why FreeDOS has 16 colors)
[#]: via: (https://opensource.com/article/21/6/freedos-sixteen-colors)
[#]: author: (Jim Hall https://opensource.com/users/jim-hall)
[#]: collector: (lujun9972)
[#]: translator: (gpchn)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
为什么 FreeDOS 有 16 种颜色
======
为什么文本只能使用这些有限的颜色显示,为什么 FreeDOS 使用这些颜色和阴影,而不是其他颜色?
答案就像技术中的许多事情一样,因为历史。
![在 1980 年代计算机上打字][1]
如果您仔细了解过 FreeDOS您可能已经注意到文本有有限的颜色范围——16 种文本颜色和 8 种背景颜色。这类似于 Linux 显示文本颜色的方式——您或许能够在 Linux 终端中更改 _文本颜色_,但您仍然只能使用 16 种文本颜色和 8 种背景颜色。
![终端颜色][2]
DOS 文本有 16 种颜色和 8 种背景颜色
(吉姆·霍尔,[CC-BY SA 4.0][3]
为什么文本只能使用这些有限的颜色显示,为什么 FreeDOS 使用这些颜色和阴影,而不是其他颜色?
答案就像技术中的许多事情一样,因为历史。
### PC 色彩的由来
为了解释为什么文本只有十六种颜色,让我给你讲一个关于第一台 IBM 个人计算机的故事。这个故事的部分内容可能有些杜撰,但基本内容已经足够接近。
IBM 于 1981 年发布了个人计算机 5150“IBM PC”。该 PC 使用了一个简单的监视器屏幕,以绿色显示文本。由于此显示器仅适用于一种颜色,因此被称为 _monochrome_“IBM 5151 单色显示器”,搭载 IBM Monochrome Display Adapter 卡或“MDA”
同年IBM 发布了 PC 的更新版本,具有惊人的技术成就——颜色!新的 IBM 5153 彩色显示器依赖于新的 IBM 彩色图形适配器或“CGA”。正是由于这个原始的 CGA所有的 DOS 文本都继承了它们的颜色。
但在我们讨论那一部分之前,我们首先需要了解一些关于颜色的东西。当我们谈论计算机屏幕上的颜色时,我们谈论的是混合 _三原色_(红色、绿色和蓝色)的不同值。您可以将不同级别(或“亮度”)的红光、绿光和蓝光混合在一起,以创建几乎任何颜色。混合红色和蓝色光,你会得到洋红色。混合蓝色和绿色,你会得到青色或浅绿色。均匀地混合所有颜色,你会得到白色。没有任何浅色,您会看到黑色(没有颜色)。
![三原色][4]
混合红色、绿色和蓝色光以获得不同的颜色
(吉姆·霍尔,[CC-BY SA 4.0][3]
IBM 5153 彩色显示器通过在阴极射线管“CRT”上点亮微小的红色、绿色和蓝色光点来向用户呈现颜色。这些小点排列得非常紧密并以红色、绿色和蓝色的三色点组成一个“像素”的模式排列。通过控制同时点亮哪些荧光点IBM 5153 彩色显示器可以显示不同颜色的像素。
![CRT 像素][5]
每个红色、绿色和蓝色三元组都是一个像素
(吉姆·霍尔,[CC-BY SA 4.0][3]
顺便说一句,即使是现代显示器也使用这种红色、绿色和蓝色点的组合来表示颜色。现代计算机的不同之处在于,每个像素都使用红色、绿色和蓝色 LED 灯(通常并排排列),而不是微小的荧光点。计算机可以打开或关闭每个 LED 灯,以混合每个像素中的红色、绿色和蓝色。
![液晶像素][6]
每个红色、绿色和蓝色三元组都是一个像素
(吉姆·霍尔,[CC-BY SA 4.0][3]
### 定义 CGA 颜色
IBM 工程师意识到他们可以通过混合红色、绿色和蓝色像素来显示多种颜色。在最简单的情况下您可以假设单个像素中的每个红色、绿色和蓝色点要么“开”要么“关”。正如任何计算机程序员都会告诉你的那样你可以将“on”和“off”表示为二进制——11=on和00=off
用1或0表示红色、绿色和蓝色意味着您可以组合多达八种颜色从 000红色、绿色和蓝色都关闭到 111红色、绿色和蓝色都打开。请注意位模式类似于“RGB”因此 RGB=001 是蓝色的只有蓝色是打开的RGB=011 是青色的(绿色和蓝色都打开了):
| |
| :----: |
| 000 Black |
| 001 Blue |
| 010 Green |
| 011 Cyan |
| 100 Red |
| 101 Magenta |
| 110 Yellow |
| 111 White |
但这只是最简单的情况。一位特别聪明的 IBM 工程师意识到,只需再添加一点,您就可以将颜色数量从 8 种颜色增加到 16 种。因此,我们可以使用像 iRGB 这样的位模式,而不是像 RGB 这样的位模式。我们将把这个额外的“i”位称为“强度”位因为如果我们将“强度”位设置为 1那么我们将在全亮度下点亮红色、绿色和蓝色如果“强度”位为 0关闭我们可以使用一些中级亮度。
有了这个简单的修复程序,现在 CGA 可以显示 16 种颜色为了简单起见IBM 工程师将高强度颜色称为常规颜色名称的“明亮”版本。因此,“红色”与“亮红色”配对,“洋红色”与“亮洋红色”配对。
| | |
| :----: | :----: |
| 0000 Black | 1000 Bright Black |
| 0001 Blue | 1001 Bright Blue |
| 0010 Green | 1010 Bright Green |
| 0011 Cyan | 1011 Bright Cyan |
| 0100 Red | 1100 Bright Red |
| 0101 Magenta | 1101 Bright Magenta |
| 0110 Yellow | 1110 Bright Yellow |
| 0111 White | 1111 Bright White |
哦不,等等!这实际上不是十六种颜色。如果您注意到 iRGB=0000黑色和 iRGB=1000亮黑色它们都是相同的_黑色_。没有颜色可以“亮”所以它们都是普通的黑色。这意味着我们只有 15 种颜色而不是我们希望的16种颜色。
但 IBM 有聪明的工程师为他们工作,他们意识到如何解决这个问题以获得 16 种颜色。IBM 实际上没有实现直接的 RGB 到 iRGB而是实现了_类_ iRGB 方案。随着这一变化IBM 为每个光点设置了四个亮度级别完全关闭、三分之一亮度、三分之二亮度和全亮度。如果“亮度”位被关闭那么每个红色、绿色和蓝色光点将以三分之二的亮度点亮。如果您打开“亮度”位RGB 颜色中的所有 0 都将以三分之一的亮度点亮,而所有 1 都将以全亮度点亮。
让我用另一种方式向您描述这一点,使用 Web 颜色代码表示。如果您熟悉 HTML 颜色,您可能知道您可以使用 #RGB 表示颜色,其中 RGB 表示红色、绿色和蓝色值的组合,每个值都在十六进制值 0 到 F 之间。因此,使用 IBM 修改后的 iRGB 定义iRGB=0001 是 #00a蓝色iRGB=1001 是 #55f亮蓝色因为对于高亮度颜色RGB=001 中的所有零点都以三分之一的亮度点亮0 到 F 刻度上的“5”左右RGB=001 中的所有零点都以三分之二的亮度点亮0 到 F刻度上的“A”
| | |
| :----: | :----: |
| 0000 Black | 1000 Bright Black |
| 0001 Blue | 1001 Bright Blue |
| 0010 Green | 1010 Bright Green |
| 0011 Cyan | 1011 Bright Cyan |
| 0100 Red | 1100 Bright Red |
| 0101 Magenta | 1101 Bright Magenta |
| 0110 Yellow | 1110 Bright Yellow |
| 0111 White | 1111 Bright White |
有了这些颜色,我们终于完成了!我们拥有从 iRGB=0000黑色到 iRGB=1111亮白色以及介于两者之间的所有颜色的全光谱。 就像彩虹般的颜色,这很漂亮。
除了……不,等等,这里有问题!我们实际上还不能复制彩虹的所有颜色。我们在小学学到的方便的助记符是 ROYGBIV它可以帮助我们记住彩虹的颜色有红色、橙色、黄色、绿色、蓝色、靛蓝和紫色。我们修改后的 iRGB 配色方案包括红色、黄色、绿色和蓝色——我们可以将其“伪造”为靛蓝和紫色,但是我们缺少橙色。遭了!
![彩虹][7]
一条美丽的彩虹——不幸的是它含有橙色。
[Paweł Fijałkowski][8],公共)
为了解决这个问题,聪明的 IBM 工程师对 RGB=110 做了最后的修复。高强度颜色(iRGB=1110) 以全亮度点亮红色和绿色荧光粉点以产生黄色但是在低亮度颜色iRGB=0110他们以三分之二的亮度点亮红色以三分之一的亮度点亮绿色。这将 iRGB=0110 变成了橙色——尽管它后来被称为“棕色”,因为 IBM 不得不在某处弄乱标准名称。
| | |
| :----: | :----: |
| 0000 Black | 1000 Bright Black |
| 0001 Blue | 1001 Bright Blue |
| 0010 Green | 1010 Bright Green |
| 0011 Cyan | 1011 Bright Cyan |
| 0100 Red | 1100 Bright Red |
| 0101 Magenta | 1101 Bright Magenta |
| 0110 Brown | 1110 Yellow |
| 0111 White | 1111 Bright White |
这就是 CGA 以及扩展的 DOS 获得十六种颜色的方式!如果您好奇,这也是为什么会有“亮黑色”的原因,即使它只是一种灰色阴影。
### 表示颜色bit 和 byte
但是你可能想知道:为什么 DOS 可以显示 16 种文本颜色,却只能显示 8 种背景颜色?为此,我们需要快速了解计算机如何将颜色信息传递给 CGA 卡。
简而言之CGA 卡希望将每个字符的文本颜色和背景颜色编码在一个字节数据包中,一共八位。那么八位是从哪里来的呢?
我们刚刚了解了 iRGB四位如何生成十六种颜色。文本颜色使用 iRGB 四位背景颜色仅限于八种低强度颜色RGB三位加起来只有七位。丢失的第八位在哪里
最后一点可能是为 DOS 时代最重要的用户界面元素保留的——闪烁文本。虽然今天闪烁的文本可能很烦人,但在整个 1980 年代初期,闪烁的文本是表示错误消息等关键信息的友好方式。
将这个“闪烁”位添加到三个背景颜色位 (RGB) 和四个文本颜色位 (iRGB) 中会产生八个位或一个字节!计算机喜欢以完整字节为单位进行计数,这使其成为将颜色(和闪烁)信息传输到计算机的便捷方式。
因此表示颜色和闪烁的完整字节是“Bbbbffff”其中“ffff”是文本颜色的 iRGB 位模式(从 0 到 15“bbb”是低强度的 RGB 位模式背景颜色(从 0 到 7`B` 是“闪烁”位。
十六种文本颜色和八种背景颜色的限制一直持续到今天。当然DOS 坚持使用这种颜色组合,但即使是像 GNOME 终端这样的 Linux 终端仿真器也仍然受限于 16 种文本颜色和 8 种背景颜色。当然Linux 终端可能允许您更改使用的特定颜色,但您仍然限于十六种文本颜色和八种背景颜色。为此,您要感谢 DOS 和最初的 IBM PC。别客气
--------------------------------------------------------------------------------
via: https://opensource.com/article/21/6/freedos-sixteen-colors
作者:[Jim Hall][a]
选题:[lujun9972][b]
译者:[gpchn](https://github.com/gpchn)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/jim-hall
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/1980s-computer-yearbook.png?itok=eGOYEKK- (Person typing on a 1980's computer)
[2]: https://opensource.com/sites/default/files/uploads/16colors.png (DOS text comes in 16 colors and 8 background colors)
[3]: https://creativecommons.org/licenses/by-sa/4.0/
[4]: https://opensource.com/sites/default/files/uploads/rgb.svg_.png (Mix red, green, and blue light to get different colors)
[5]: https://opensource.com/sites/default/files/uploads/crt.svg_.png (Each red, green, and blue triad is a single pixel)
[6]: https://opensource.com/sites/default/files/uploads/lcd.svg_.png (Each red, green, and blue triad is a single pixel)
[7]: https://opensource.com/sites/default/files/uploads/rainbow.jpg (A beautiful rainbow - which unfortunately contains orange )
[8]: https://www.pexels.com/photo/landscape-photography-of-field-with-wind-mill-with-rainbow-1253748/

View File

@ -7,38 +7,38 @@
[#]: publisher: " "
[#]: url: " "
Boost the power of C with these open source libraries
使用开源库提升 C 语言编程能力
======
GObject and libsoup do a lot of work for you, so you can turn your attention to inventing amazing applications in C.
开源库 GObject 和 libsoup 已经做了很多工作,因此你可以专注于使用 C 语言开发神奇的应用。
![Why and how to handle exceptions in Python Flask][1]
Image by: Image from Unsplash.com, Creative Commons Zero
图源: Unsplash.com, Creative Commons Zero
The [GLib Object System (GObject)][2] is a library providing a flexible and extensible object-oriented framework for C. In this article, I demonstrate using the 2.4 version of the library.
[GLib Object System (GObject)][2] 是为 C 语言提供了灵活且可扩展的面向对象框架的库。在这篇文章中,我将使用该库的 2.4 版本进行演示。
The GObject libraries extend the ANSI C standard, with typedefs for common types such as:
GObject 库继承了 ANSI C 标准,拥有一些常见的数据类型,例如:
* gchar: a character type
* guchar: an unsigned character type
* gunichar: a fixed 32 bit width unichar type
* gboolean: a boolean type
* gint8, gint16, gint32, gint64: 8, 16, 32, and 64 bit integers
* guint8, guint16, guint32, guint64: unsigned 8, 16, 32, and 64 bit integers
* gfloat: an IEEE Standard 754 single precision floating point number
* gdouble: an IEEE Standard 754 double precision floating point number
* gpointer: a generic pointer type
* gchar: 字符型
* guchar: 无符号字符型
* gunichar: 宽为 32 比特的 Unicode 字符型
* gboolean: 布尔型
* gint8, gint16, gint32, gint64: 8, 16, 32 和 64 比特有符号整数
* guint8, guint16, guint32, guint64: 无符号 8, 16, 32 和 64 比特整数
* gfloat: IEEE 754 标准单精度浮点数
* gdouble: IEEE 754 标准 双精度浮点数
* gpointer: 泛指针
### Function pointers
### 函数指针
GObject also introduces a type and object system with classes and interfaces. This is possible because the ANSI C language understands function pointers.
GObject 库还引入了类和接口的类型和对象体系。这是可能的,因为 ANSI C 语言理解函数指针。
To declare a function pointer, you can do this:
你可以这样做来声明函数指针:
```c
void (*my_callback)(gpointer data);
```
But first, you need to assign the `my_callback` variable:
首先,你需要给变量 `my_callback` 赋值:
```c
void my_callback_func(gpointer data)
@ -49,7 +49,7 @@ void my_callback_func(gpointer data)
my_callback = my_callback_func;
```
The function pointer `my_callback` can be invoked like this:
函数指针 `my_callback` 可以这样来调用:
```c
gpointer data;
@ -57,11 +57,11 @@ data = g_malloc(512 * sizeof(gint16));
my_callback(data);
```
### Object classes
### 对象类
The GObject base class consists of 2 structs (`GObject` and `GObjectClass` ) which you inherit to implement your very own objects.
GObject 基类由 2 个结构(`GObject` 和 `GObjectClass`)组成,你可以继承它们以实现你自己的对象。
You embed GObject and GObjectClass as the first struct field:
你需要在结构体中先嵌入 `GObject``GObjectClass`
```c
struct _MyObject
@ -79,9 +79,9 @@ struct _MyObjectClass
GType my_object_get_type(void);
```
The objects implementation contains fields, which might be exposed as properties. GObject provides a solution to private fields, too. This is actually a struct in the C source file, instead of the header file. The class usually contains function pointers only.
对象的实现包含了公有成员。GObject 也提供了私有成员的方法。这实际上是 C 源文件中的一个结构,而不是头文件。该类通常只包含函数指针。
An interface cant be derived from another interface and is implemented as following:
一个接口不能派生自另一个接口,比如:
```c
struct _MyInterface
@ -91,7 +91,7 @@ struct _MyInterface
};
```
Properties are accessed by `g_object_get()` and `g_object_set()` function calls. To get a property, you must provide the return location of the specific type. Its recommended that you initialize the return location first:
通过调用 `g_object_get()``g_object_set()` 函数来访问属性。若要获取属性,你必须提供特定类型的返回位置。建议先初始化返回位置:
```c
gchar *str
@ -103,7 +103,7 @@ g_object_get(gobject,
  NULL);
```
Or you might want to set the property:
或者你想要设置属性:
```c
g_object_set(gobject,
@ -111,9 +111,9 @@ g_object_set(gobject,
  NULL);
```
### The libsoup HTTP library
### libsoup HTTP 库
The `libsoup` project provides an HTTP client and server library for GNOME. It uses GObjects and the glib main loop to integrate with GNOME applications, and also has a synchronous API for use in command-line tools. First, create a `libsoup` session with an authentication callback specified. You can also make use of cookies.
`libsoup` 项目为 GNOME 提供了 HTTP 客服端和服务端使用的库。它使用 GObjects 和 glib 主循环与 GNOME 应用融合,并且还具有用于命令行的同步 API。首先创建一个特定身份验证回调的 `libsoup` 会话。你也可以使用 cookie。
```c
SoupSession *soup_session;
@ -131,7 +131,7 @@ g_signal_connect(soup_session, "authenticate",
  G_CALLBACK(my_authenticate_callback), NULL);
```
Then you can create a HTTP GET request like the following:
然后你可以像这样创建一个 HTTP GET 请求:
```c
SoupMessage *msg;
@ -176,9 +176,10 @@ if(status == 200){
}
```
The authentication callback is called as the web server asks for authentication.
当网络服务器进行身份认证时,会调用身份认证回调函数。
这是一个函数签名:
Heres a function signature:
```c
#define MY_AUTHENTICATE_LOGIN "my-username"
@ -197,11 +198,11 @@ void my_authenticate_callback(SoupSession *session,
}
```
### A libsoup server
### 一个 libsoup 服务器
For basic HTTP authentication to work, you must specify a callback and server context path. Then you add a handler with another callback.
想要基础的 HTTP 身份认证能够运行,你需要指定回调函数和服务器内容路径。然后再添加一个带有另一个回调的处理程序。
This example listens to any IPv4 address on localhost port 8080:
下面这个例子展示了在 8080 端口监听任何 IPv4 地址的消息:
```c
SoupServer *soup_server;
@ -245,9 +246,9 @@ soup_server_listen_socket(soup_server,
  ip4_socket, 0, &error);
```
In this example code, there are two callbacks. One handles authentication, and the other handles the request itself.
示例代码中,有两个回调函数。一个处理身份认证,另一个处理对它的请求。
Suppose you want a web server to allow a login with the credentials username **my-username** and the password **my-password**, and to set a session cookie with a random unique user ID (UUID) string.
假设你想要网页服务器运行一个用户名为 **my-username** 和口令为 **my-password** 的用户登录,并且用一个随机且唯一的用户 ID 字符串设置会话 cookie。
```c
gboolean my_xmlrpc_server_auth_callback(SoupAuthDomain *domain,
@ -284,7 +285,7 @@ gboolean my_xmlrpc_server_auth_callback(SoupAuthDomain *domain,
}
```
A handler for the context path **my-xmlrpc**:
对内容路径 **my-xmlrpc** 进行处理的函数:
```c
void my_xmlrpc_server_callback(SoupServer *soup_server,
@ -300,9 +301,9 @@ void my_xmlrpc_server_callback(SoupServer *soup_server,
}
```
### A more powerful C
### 更加强大的 C 语言
I hope my examples show how the GObject and libsoup projects give C a very real boost. Libraries like these extend C in a literal sense, and by doing so they make C more approachable. They do a lot of work for you, so you can turn your attention to inventing amazing applications in the simple, direct, and timeless C language.
希望我的示例展现了 GObject 和 libsoup 项目给 C 语言带来了真正的提升。像这样在字面意义上扩展 C 语言,可以使 C 语言更易于使用。他们已经为你做了许多工作,这样你可以专注于用 C 语言开发简单、直接的应用程序了。
--------------------------------------------------------------------------------

View File

@ -0,0 +1,123 @@
[#]: subject: "Komikku: A Free and Open-Source Manga Reader for Linux"
[#]: via: "https://itsfoss.com/komikku-manga-reader/"
[#]: author: "Anuj Sharma https://itsfoss.com/author/anuj/"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Komikku: 一个免费的、开源的 Linux 漫画Manga阅读器
======
喜欢阅读漫画书吗?有[大量可用于 Linux 的漫画阅读器][1]。
但是为日本漫画Manga量身定做的东西呢
我想我找到了一个适合阅读漫画的完美应用,它可以组织它们,也可以下载它们进行离线使用。我最近发现的这个应用叫做 **Kommiku**
让我提一下这个应用的主要亮点,并帮助你在 Linux 上开始使用它。
### Komikku: 一个 Linux 专用的漫画阅读器
![Komikku UI][2]
Komikku 是一个开源的漫画阅读器,且仅有 Linux 应用。
它主要是为配合 GNOME 桌面环境而定制的,但你也可以在运行[其他桌面环境][3]的 Linux 发行版上使用它。
许多 PDF 或[电子书阅读器][4]如 Bookworm、Calibre 和 Foliate 都支持漫画书格式。
然而Komikku 用户更多的有功能,以获得阅读漫画的良好体验。
![Komikku 在线服务器列表][5]
例如Komikku 可在线和离线观看漫画。此外,你可以从支持的服务器上下载它。
### Komikku 的特点
![komikku reader][6]
Komikku的 一些最佳功能包括:
* 从几十个支持的服务器进行在线阅读。
* 从已下载的漫画离线阅读。
* 组织你的库的类别。
* 从右到左、从左到右、垂直和网络漫画阅读模式。
* 几种类型的导航(键盘方向键,通过鼠标左右滑动或点击(触摸板/触摸屏)、滚轮和滑动手势(触摸板和触摸屏)。
* 漫画的自动更新。
* 自动下载新的章节。
* 阅读历史。
* 浅色和深色主题。
* 自适应设计(能够从桌面工作站扩展到移动电话)。
* 键盘快捷键。
![Komikku 紧凑视图][7]
### 安装
Komikku 可在 [Flathub][8] 上找到。因此,你可以把它安装在任何 Linux 发行版上。
然而,你需要[在你的系统上设置 Flatpak 并启用 Flathub 仓库][9]。
当你在系统上设置了 Flatpak你可以通过软件中心搜索它或者从你的终端安装它。
![从 GNOME 软件中安装 Komikku][10]
要使用终端安装Komikku请输入以下命令
```
flatpak install flathub info.febvre.Komikku
```
Komikku 的原生包也可用于 Arch Linux 和 Fedora 等发行版。以下是安装它们的命令:
对于 Arch Linux在 AUR 中可用):
```
yay -Syu komikku
```
对于 Fedora在官方仓库中可用
```
sudo dnf install komikku
```
查看 Komikku 的源代码以及在其 [GitLab 页面][11]上从源代码构建它的说明。前往其官方网页了解更多信息。
[下载 Komikku][12]
### 总结
我发现 Komikku 是非常直观和干净的。注意到在线服务器并不总是工作,可以预期会有一些小故障,但管理离线漫画和将你的收藏分类是毫不费力的。
所有这些都要感谢 **Valéry Febvre**Komikku 的开发者),我们有了另一个有用的 Linux 应用。如果你喜欢这个应用,你可以考虑向该项目捐款。
*你使用哪种漫画书阅读器?你会尝试 Komikku 吗?请在下面的评论中告诉我你的想法*。
--------------------------------------------------------------------------------
via: https://itsfoss.com/komikku-manga-reader/
作者:[Anuj Sharma][a]
选题:[lkxed][b]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/anuj/
[b]: https://github.com/lkxed
[1]: https://itsfoss.com/best-comic-book-reader-linux/
[2]: https://itsfoss.com/wp-content/uploads/2022/09/komikku-library.png
[3]: https://itsfoss.com/best-linux-desktop-environments/
[4]: https://itsfoss.com/best-ebook-readers-linux/
[5]: https://itsfoss.com/wp-content/uploads/2022/09/komikku-online-servers.png
[6]: https://itsfoss.com/wp-content/uploads/2022/09/komikku-reader.png
[7]: https://itsfoss.com/wp-content/uploads/2022/09/komikku-mobile-view.png
[8]: https://flathub.org/apps/details/info.febvre.Komikku
[9]: https://itsfoss.com/flatpak-guide/
[10]: https://itsfoss.com/wp-content/uploads/2022/09/install-komikku-gnome-software.png
[11]: https://gitlab.com/valos/Komikku
[12]: https://valos.gitlab.io/Komikku/

View File

@ -0,0 +1,88 @@
[#]: subject: "How I switched from Docker Desktop to Colima"
[#]: via: "https://opensource.com/article/22/9/docker-desktop-colima"
[#]: author: "Michael Anello https://opensource.com/users/ultimike"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
我如何从 Docker Desktop 切换到 Colima
======
Colima 是 macOS 和 Linux 的 Docker 桌面替代品,它现在由 DDEV 支持。
![Getting started with Perlbrew][1]
图片来源freephotocc 在 Pixabay CC0 下发布
[DDEV][2] 是一个开源工具,可以在几分钟内轻松启动和运行本地 PHP 开发环境。由于其每个项目的环境配置可以扩展、版本控制和共享所以它很强大和灵活。简而言之DDEV 旨在允许开发团队在其工作流程中使用容器,而无需复杂的定制配置。
DDEV 用灵活、现代、基于容器的解决方案取代了更传统的 AMP 栈解决方案WAMP、MAMP、XAMPP 等。因为它使用容器DDEV 允许每个项目使用任何一组应用、Web 服务器版本、数据库服务器、搜索索引服务器和其他类型的软件。
2022 年 3 月DDEV 团队[宣布支持 Colima][3],这是 macOS 和 Linux 的开源 Docker 桌面替代品。 [Colima][5] 是开源的,据所有报告显示,它比其替代方案获得了[性能提升][6],所以使用 Colima 似乎是一个没有问题的选择。。
### 迁移到 Colima
首先Colima *几乎*是 Docker Desktop 的替代品。我说*几乎*是因为在将它用于现有的 DDEV 项目时需要重新配置。具体来说,必须重新导入数据库。解决方法是先导出数据库,然后启动 Colima然后再导入。很简单。
Colima 要求安装 Docker 或 [Podman][7] 命令。在 Linux 上,它还需要 Lima。
Docker 默认随 Docker Desktop for macOS 一起安装,但它也可以作为独立命令使用。如果你想要 100% 纯 Colima你可以卸载 Docker Desktop for macOS并独立安装和配置 Docker 客户端。[完整的安装说明可以在 DDEV 文档站点上找到][8]。
![容器技术栈图片。][9]
图片来源Mike AnelloCC BY-SA 4.0
如果你选择继续使用 Colima 和 Docker Desktop那么在命令行执行 docker 命令时,你必须首先指定要使用的容器。下一节将对此进行更多介绍。
### 在 macOS 上安装 Colima
我目前有一些使用 Docker 的本地项目,还有一些使用 Colima。当我了解了基础知识在它们之间切换就不难了。
1. 开始使用 Homebrew `brew install colima` 安装 Colima
2. ddev poweroff为了安全起见
3. 接下来,使用 `colima start --cpu 4 --memory 4` 启动 Colima --cpu 和 --memory 选项只需执行一次。第一次之后,只需要 `colima start`
4. 如果你像我一样是 DDEV 用户,那么你可以使用常用的 `ddev` 命令ddev config、ddev start 等)启动一个全新的 Drupal 9 站点。建议启用 DDEV 的 mutagen 功能以最大化性能。
### 在 Colima 和 Docker Desktop 之间切换
如果你还没有准备好使用 Colima你可以同时安装 Colima 和 Docker Desktop。
1. 首先关闭 ddevddev poweroff
2. 然后停止Colima`colima stop`
3. 现在运行 `docker context use default` 告诉 Docker 客户端你要使用哪个容器。默认名称是 Docker Desktop for Mac。当 `colima start` 运行时,它会自动将 Docker 切换到 `colima` 上下文。
4. 要继续使用默认Docker Desktop上下文请使用 `ddev start` 命令。
从技术上讲,启动和停止 Colima 不是必需的,但是在两个上下文之间切换时的 `ddev poweroff` 命令是必要的。
Colima 停止时,最新版本的 Colima 会将 Docker 上下文恢复为 `default`,因此不再需要 `docker context use default` 命令。无论如何,我仍然使用 `docker context show` 来验证 `default`Docker Desktop for Mac`colima` 上下文是否正在使用。基本上,术语 `context` 指的是 Docker 客户端将命令发送到哪个容器提供者。
### 尝试 Colima
总的来说,我喜欢我目前所看到的。我没有遇到任何问题,而且基于 Colima 的网站看起来更快些(尤其是在启用 DDEV 的 Mutagen 功能时)。我肯定会预见自己在未来几周内将项目网站迁移到 Colima。
*本文最初出现发布在 [DrupalEasy 博客][10]并经许可重新发布。*
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/9/docker-desktop-colima
作者:[Michael Anello][a]
选题:[lkxed][b]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/ultimike
[b]: https://github.com/lkxed
[1]: https://opensource.com/sites/default/files/lead-images/coffee_cafe_brew_laptop_desktop.jpg
[2]: https://github.com/drud/ddev
[3]: https://ddev.com/ddev-local/docker-desktop-alternatives-arrive-for-ddev-colima/
[5]: https://github.com/abiosoft/colima
[6]: https://ddev.com/ddev-local/docker-desktop-and-colima-benchmarking-on-macos/
[7]: https://opensource.com/article/22/2/start-running-containers
[8]: https://ddev.readthedocs.io/en/stable/users/docker_installation/#macos-installation-colima
[9]: https://opensource.com/sites/default/files/2022-09/docker-desktop-colima.png
[10]: https://www.drupaleasy.com/news