mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-01-28 23:20:10 +08:00
commit
5c4c7d1a51
255
published/20201118 Secure your containers with SELinux.md
Normal file
255
published/20201118 Secure your containers with SELinux.md
Normal file
@ -0,0 +1,255 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (wxy)
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-14319-1.html)
|
||||
[#]: subject: (Secure your containers with SELinux)
|
||||
[#]: via: (https://opensource.com/article/20/11/selinux-containers)
|
||||
[#]: author: (Mike Calizo https://opensource.com/users/mcalizo)
|
||||
|
||||
用 SELinux 保护你的容器
|
||||
======
|
||||
|
||||
> 黑掉你的系统,了解为什么配置 SELinux 作为你的第一道容器防线是很重要的。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202203/02/093614t53cfb857841qzzk.jpg)
|
||||
|
||||
当有些事情在你的 Linux 环境中不能正常工作时,最简单的方法就是禁用<ruby>安全增强型 Linux<rt>Security-Enhanced Linux</rt></ruby>([SELinux][2])。而当它突然可以工作了,你就会忘记了禁用这件事 —— 这是一个常见的陷阱,意味着你已经失去了一个非常强大的安全工具。
|
||||
|
||||
随着容器、微服务和分布式架构的兴起,威胁也在上升。这是由于一个老的、众所周知的问题:速度。容器的优势在于它们能让你快速行动,做更多的事情,并迅速改变。这意味着容器的采用已经飞速发展,但它所提供的速度也意味着你会遇到更多的问题和漏洞。当你越来越快地做更多的事情时,这自然会发生。
|
||||
|
||||
### 如何减轻威胁
|
||||
|
||||
正如孙子所说,“不战而屈人之兵”。当涉及到容器的基本防御时,这句话真的很有共鸣。为了避免问题(战斗),确保你的容器主机是安全的,你可以使用 SELinux 作为你的第一道防线。
|
||||
|
||||
SELinux 是一个开源项目,于 2000 年发布,2003 年集成到 Linux 内核中。根据 [红帽公司的解释][3],“SELinux 是 [Linux 系统][4] 的一个安全架构,允许管理员对谁可以访问系统有更多的控制。它最初是由美国国家安全局(NSA)开发的,是使用 Linux 安全模块(LSM)对 [Linux 内核][5] 的一系列补丁。”
|
||||
|
||||
### 开始吧
|
||||
|
||||
当你想到容器时,首先想到的可能是 [Docker][6]。Docker 在 2013 年出现后掀起了一场容器采用革命。它是容器爆炸性流行的主要原因之一,但如上所述,大量采用增加了用户对安全风险的脆弱性。
|
||||
|
||||
在你用 SELinux 保护你的 Docker 容器之前,你需要设置一些东西。
|
||||
|
||||
#### 前置条件
|
||||
|
||||
* 安装并配置了 CentOS 8/RHEL 8。
|
||||
* 安装并配置好 Docker CE
|
||||
* 创建两个账户:root 和 非 root 用户(下面的例子中是 `mcalizo`)。
|
||||
|
||||
如果你需要在你的 RHEL 8/CentOS 8 服务器上设置 Docker,你可以按照这些 [说明][7]。如果你运行的是 RHEL 8,你需要在开始之前删除预装的 Podman 和 runc 包。
|
||||
|
||||
首先,确保 SELinux 被启用:
|
||||
|
||||
```
|
||||
[mcalizo@Rhel82 ~]$ sestatus
|
||||
SELinux status: enabled
|
||||
SELinuxfs mount: /sys/fs/selinux
|
||||
SELinux root directory: /etc/selinux
|
||||
Loaded policy name: targeted
|
||||
Current mode: enforcing
|
||||
Mode from config file: enforcing
|
||||
Policy MLS status: enabled
|
||||
Policy deny_unknown status: allowed
|
||||
Memory protection checking: actual (secure)
|
||||
Max kernel policy version: 31
|
||||
[mcalizo@Rhel82 ~]$
|
||||
```
|
||||
|
||||
然后,验证你的操作系统版本和 Docker 正在运行。以 root 身份登录并运行:
|
||||
|
||||
```
|
||||
[root@rhel82 ~]# cat /etc/redhat-release
|
||||
Red Hat Enterprise Linux release 8.2 (Ootpa)
|
||||
[root@rhel82 ~]#
|
||||
|
||||
[root@rhel82 ~]# systemctl status docker
|
||||
● docker.service - Docker Application Container Engine
|
||||
Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
|
||||
Active: active (running) since Wed 2020-10-28 19:10:14 EDT; 15s ago
|
||||
Docs: https://docs.docker.com
|
||||
Main PID: 30768 (dockerd)
|
||||
Tasks: 8
|
||||
Memory: 39.0M
|
||||
CGroup: /system.slice/docker.service
|
||||
└─30768 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
|
||||
|
||||
Oct 28 19:10:13 rhel82.home.labs.com dockerd[30768]: time="2020-10-28T19:10:13.889602941-04:00" level=error msg=">
|
||||
Oct 28 19:10:13 rhel82.home.labs.com dockerd[30768]: time="2020-10-28T19:10:13.903413613-04:00" level=warning msg>
|
||||
Oct 28 19:10:13 rhel82.home.labs.com dockerd[30768]: time="2020-10-28T19:10:13.903427451-04:00" level=warning msg>
|
||||
Oct 28 19:10:13 rhel82.home.labs.com dockerd[30768]: time="2020-10-28T19:10:13.903538271-04:00" level=info msg="L>
|
||||
Oct 28 19:10:14 rhel82.home.labs.com dockerd[30768]: time="2020-10-28T19:10:14.132060506-04:00" level=info msg="D>
|
||||
Oct 28 19:10:14 rhel82.home.labs.com dockerd[30768]: time="2020-10-28T19:10:14.308943088-04:00" level=info msg="L>
|
||||
Oct 28 19:10:14 rhel82.home.labs.com dockerd[30768]: time="2020-10-28T19:10:14.319438549-04:00" level=info msg="D>
|
||||
Oct 28 19:10:14 rhel82.home.labs.com dockerd[30768]: time="2020-10-28T19:10:14.319570298-04:00" level=info msg="D>
|
||||
Oct 28 19:10:14 rhel82.home.labs.com dockerd[30768]: time="2020-10-28T19:10:14.333419209-04:00" level=info msg="A>
|
||||
Oct 28 19:10:14 rhel82.home.labs.com systemd[1]: Started Docker Application Container Engine
|
||||
```
|
||||
|
||||
检查你的 Docker 版本:
|
||||
|
||||
```
|
||||
[root@rhel82 ~]# docker --version
|
||||
Docker version 19.03.13, build 4484c46d9d
|
||||
```
|
||||
|
||||
### 黑掉主机
|
||||
|
||||
了解一个问题的最好方法之一就是去体验它。因此,我将告诉你,如果你的安全设置不当,向 Docker 主机注入恶意代码是多么容易。
|
||||
|
||||
为了能够在 Docker 主机上做坏事,“恶意”的非 root 用户(本教程中为 `mcalizo`)必须是可以实例化 Docker 容器的组的成员。
|
||||
|
||||
首先,确认 `mcalizo` 用户属于哪个组:
|
||||
|
||||
```
|
||||
[root@Rhel82 ~]# groups mcalizo
|
||||
mcalizo : mcalizo
|
||||
```
|
||||
|
||||
输出显示,`mcalizo` 只属于它自己的组。这意味着 `mcalizo` 不能实例化 Docker 容器,如果它试图这样做,将会得到这个错误:
|
||||
|
||||
```
|
||||
[mcalizo@Rhel82 ~]$ docker run -it --rm centos:latest /bin/sh
|
||||
docker: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.40/containers/create: dial unix /var/run/docker.sock: connect: permission denied.
|
||||
See 'docker run --help'.
|
||||
```
|
||||
|
||||
要允许 `mcalizo` 实例化容器,将用户加入 `docker` 组:
|
||||
|
||||
```
|
||||
[root@Rhel82 ~]# usermod -G docker -a mcalizo
|
||||
[root@Rhel82 ~]# groups mcalizo
|
||||
mcalizo : mcalizo docker
|
||||
```
|
||||
|
||||
接下来,部署一个 `fedora:latest` 的容器,并登录到实例化的容器中去探索它:
|
||||
|
||||
```
|
||||
[mcalizo@Rhel82 ~]$ docker run -it --rm fedora:latest /bin/sh
|
||||
Unable to find image 'fedora:latest' locally
|
||||
latest: Pulling from library/fedora
|
||||
ee7e89337106: Pull complete
|
||||
Digest: sha256:b9ec86d36fca7b1d3de39cd7c258e8d90c377d312c21a7748071ce49069b8db4
|
||||
Status: Downloaded newer image for fedora:latest
|
||||
sh-5.0# cat /etc/redhat-release
|
||||
Fedora release 33 (Thirty Three)
|
||||
```
|
||||
|
||||
当你登录到新创建的容器时,你可以看到你是以 root 身份自动登录的:
|
||||
|
||||
```
|
||||
sh-5.0# whoami
|
||||
root
|
||||
sh-5.0#
|
||||
```
|
||||
|
||||
作为 `root` 用户,你可以在这个容器中做任何事情,这意味着你可以利用容器主机,做很多破坏。因为你可以实例化一个容器,即使你不属于主机的 sudoers 账户,你也可以对主机做一些事情。
|
||||
|
||||
退出你刚刚创建的容器,并创建一个新的容器来演示这个漏洞:
|
||||
|
||||
```
|
||||
[mcalizo@Rhel82 ~]$ docker run -it --rm -v /:/exploit fedora:latest /bin/bash
|
||||
[root@131043f2e306 /]#
|
||||
```
|
||||
|
||||
[-v 选项][8] 将 Docker 主机的 `/` 目录挂载到 `/exploit` 目录下的容器:
|
||||
|
||||
```
|
||||
[root@131043f2e306 /]#ls exploit/
|
||||
bin boot dev etc home lib lib64 media mnt opt proc root run sbin srv sys tmp usr var
|
||||
```
|
||||
|
||||
因为它已被挂载,你可以在 Docker 主机上做任何事情。例如,你可以删除文件、编辑特定的配置来破害系统,甚至安装木马程序或其他恶意软件来窃取重要信息。
|
||||
|
||||
### 为什么会发生这种情况?
|
||||
|
||||
你可能想知道,既然 SELinux 处于强制模式,为什么会出现这种情况?深入挖掘 SELinux,看看哪里出了问题。
|
||||
|
||||
验证 SELinux 是否有一个 [Docker 上下文][9]:
|
||||
|
||||
```
|
||||
[mcalizo@Rhel82 ~]$ ps -eZ | grep docker
|
||||
system_u:system_r:container_runtime_t:s0 30768 ? 00:00:04 dockerd
|
||||
[mcalizo@Rhel82 ~]$
|
||||
```
|
||||
|
||||
正如预期的那样,它确实有。这意味着 SELinux 管理着 Docker 守护进程。检查 Docker 守护进程,看看 SELinux 是否默认启用:
|
||||
|
||||
```
|
||||
[mcalizo@Rhel82 ~]$ docker info | grep Security -A3
|
||||
Security Options:
|
||||
seccomp
|
||||
Profile: default
|
||||
Kernel Version: 4.18.0-193.el8.x86_64
|
||||
```
|
||||
|
||||
Docker 守护进程中的 SELinux 在默认情况下是 **不启用** 的。 这就是问题所在!要解决这个问题,按 [文档][10] 说明,通过更新或创建文件 `/etc/docker/daemon.json` 来启用 SELinux 来控制和管理 Docker(你必须有 root 权限才能这样做):
|
||||
|
||||
```
|
||||
[root@Rhel82 ~]# cat /etc/docker/daemon.json
|
||||
{
|
||||
"selinux-enabled": true
|
||||
}
|
||||
[root@Rhel82 ~]#
|
||||
[root@Rhel82 ~]# systemctl restart docker
|
||||
```
|
||||
|
||||
在创建或更新该文件并重启 Docker 后,你应该看到 Docker 守护进程中启用了 SELinux 支持:
|
||||
|
||||
```
|
||||
[root@Rhel82 ~]# systemctl restart docker
|
||||
[mcalizo@Rhel82 root]$ docker info | grep Security -A3
|
||||
Security Options:
|
||||
seccomp
|
||||
Profile: default
|
||||
selinux
|
||||
[mcalizo@Rhel82 root]$
|
||||
```
|
||||
|
||||
虽然仍然可以在你的 Docker 容器上挂载 Docker 主机中的特定文件系统,但不再允许更新或访问该文件:
|
||||
|
||||
```
|
||||
[mcalizo@Rhel82 root]$ docker run -it --rm -v /:/exploit fedora:latest /bin/bash
|
||||
[root@ecb5836da1f6 /]# touch /exploit/etc/shadow.sh
|
||||
touch: cannot touch '/exploit/etc/shadow.sh': Permission denied
|
||||
[root@ecb5836da1f6 /]#
|
||||
```
|
||||
|
||||
### 了解更多
|
||||
|
||||
你在容器世界中的第一道防线取决于你对容器主机的操作系统的设置有多强。有许多方法可以实现 Linux 的安全性,包括市场上可供选择的方案,以增强你的安全态势。
|
||||
|
||||
SELinux 是一个额外的安全层,默认情况下内置于 [Linux 发行版][11] 中。为了借助它保护你的系统不被破坏,请确保 SELinux 保持开启状态。
|
||||
|
||||
如果你想了解更多,请参阅:
|
||||
|
||||
* [如何在 CentOS 8 / RH 上安装 Docker CE][7]
|
||||
* [Docker 安全速查表][12]
|
||||
* [dockerd 文档][10]
|
||||
* [卷的使用文档][8]
|
||||
* [什么是 SELinux?][3]
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/11/selinux-containers
|
||||
|
||||
作者:[Mike Calizo][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[wxy](https://github.com/wxy)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/mcalizo
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/EDU_UnspokenBlockers_1110_A.png?itok=x8A9mqVA (Three closed doors)
|
||||
[2]: https://en.wikipedia.org/wiki/Security-Enhanced_Linux
|
||||
[3]: https://www.redhat.com/en/topics/linux/what-is-selinux
|
||||
[4]: https://www.redhat.com/en/topics/linux/what-is-linux
|
||||
[5]: https://www.redhat.com/en/topics/linux/what-is-the-linux-kernel
|
||||
[6]: https://opensource.com/resources/what-docker
|
||||
[7]: https://www.linuxtechi.com/install-docker-ce-centos-8-rhel-8/
|
||||
[8]: https://docs.docker.com/storage/volumes/
|
||||
[9]: https://docs.docker.com/engine/reference/commandline/context/
|
||||
[10]: https://docs.docker.com/engine/reference/commandline/dockerd/
|
||||
[11]: https://www.redhat.com/en/topics/linux/whats-the-best-linux-distro-for-you
|
||||
[12]: https://cheatsheetseries.owasp.org/cheatsheets/Docker_Security_Cheat_Sheet.html
|
351
published/20211208 Vanilla Vim is fun.md
Normal file
351
published/20211208 Vanilla Vim is fun.md
Normal file
@ -0,0 +1,351 @@
|
||||
[#]: subject: "Vanilla Vim is fun"
|
||||
[#]: via: "https://opensource.com/article/21/12/vanilla-vim-config"
|
||||
[#]: author: "Lukáš Zapletal https://opensource.com/users/lzap"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "wxy"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14326-1.html"
|
||||
|
||||
简简单单的 Vim 就很好
|
||||
======
|
||||
|
||||
> 这就是我如何从 35 个 Vim 插件降到只有 6 个的原因。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202203/04/161603q6mmr6q7kkkd2yky.jpg)
|
||||
|
||||
当你用 `—clean` 选项启动 Vim 时,它以 “素” 模式展示 Vim。没有插件、没有配置,一切回到了最初。多年来,我收集了一堆配置语句,其中一些可以追溯到 MS-DOS 或 Windows 3.1 时期。我是这样打算的:从头开始,只用 Fedora 35 中可用的插件,找到一个好的配置起点。我可以在一周的编码生活中生存下来吗?我会找到答案的!
|
||||
|
||||
规则是这样的:尽可能少的配置语句,并且只使用 Fedora 35+ 中的插件。顺便说一下,如果你不是 Fedora 用户,也请继续阅读。你可以随时从你的操作系统软件包管理器手动安装或者使用 Vim 插件管理器安装这些插件。
|
||||
|
||||
在我开始之前,有一个大问题需要解决:用 Vim 还是 Neovim(Vim 的一个复刻)。好吧,这由你决定。这篇文章中的所有内容应该对两者都适用。然而,我只用 Vim 测试过。当你登录到一个只有 `vi` 可用的服务器时,所有的这些技能都会派上用场。它可以是一个旧的 UNIX 系统、一个安装了最少的软件以提高安全性的 Linux 服务器、一个容器中的交互式 shell,或者一个空间宝贵的嵌入式系统。
|
||||
|
||||
闲话少说,下面是我提炼出来的使用 Vim 进行编码的绝对最低限度的东西:
|
||||
|
||||
```
|
||||
# dnf install --allowerasing vim-default-editor \
|
||||
vim-enhanced \
|
||||
vim-ctrlp \
|
||||
vim-airline \
|
||||
vim-trailing-whitespace \
|
||||
vim-fugitive \
|
||||
vim-ale \
|
||||
ctags
|
||||
```
|
||||
|
||||
不要担心 `—allowerasing` 选项。在确认之前,只需查看一下安装的东西。这个选项的作用是告诉软件包管理器把现有的 `nano-default-editor` 包替换为 `vim-default-editor`。这是一个小软件包,它在 shell 配置文件中将 `EDITOR` 环境变量设置为 `vim`,如果你想默认使用 Vim(例如,与 `git` 一起使用),这是必须的。这是专门针对 Fedora 的。你不需要在其他发行版或操作系统上这样做,只要确保你的 `EDITOR` shell 变量被正确设置就行。
|
||||
|
||||
### 概览
|
||||
|
||||
简单介绍一下我认为好的、干净的插件集:
|
||||
|
||||
* **CtrlP**:尽可能小的模糊查找插件(纯 vimscript)
|
||||
* **Fugitive**:一个 git 的必备工具
|
||||
* **Trailing-whitespace**:显示并修复(删除)尾部的空格
|
||||
* **Airline**:一个改进的状态行(纯 vimscript)
|
||||
* **Ale**:在你打字时高亮显示错别字或语法错误
|
||||
* **Ctags**:不是 Vim 插件,但却是一个非常需要的工具
|
||||
|
||||
还有其他的模糊查找插件,如 command-t 或我最喜欢的 `fzf.vim`(非常快)。问题是,`fzf.vim` 不在 Fedora 中,而我想要尽可能少的配置。CtrlP 就可以了,而且配置它更容易,因为它不需要什么依赖。
|
||||
|
||||
如果让我选择一个绝对最小的配置,那就是:
|
||||
|
||||
```
|
||||
# cat ~/.vimrc
|
||||
let mapleader=","
|
||||
let maplocalleader="_"
|
||||
filetype plugin indent on
|
||||
let g:ctrlp_map = '<leader><leader>'
|
||||
let g:ctrlp_user_command = ['.git/', 'git --git-dir=%s/.git ls-files -oc --exclude-standard']
|
||||
set exrc
|
||||
set secure
|
||||
```
|
||||
|
||||
但这可能太极端了,所以这里是一个稍大的配置,下面是我的详细解释:
|
||||
|
||||
```
|
||||
" vim: nowrap sw=2 sts=2 ts=2 et:
|
||||
|
||||
" leaders
|
||||
let mapleader=","
|
||||
let maplocalleader="_"
|
||||
|
||||
" filetype and intent
|
||||
filetype plugin indent on
|
||||
|
||||
" incompatible plugins
|
||||
if has('syntax') && has('eval')
|
||||
packadd! matchit
|
||||
end
|
||||
|
||||
" be SSD friendly (can be dangerous!)
|
||||
"set directory=/tmp
|
||||
|
||||
" move backups away from projects
|
||||
set backupdir=~/.vimbackup
|
||||
|
||||
" fuzzy searching
|
||||
let g:ctrlp_map = '<leader><leader>'
|
||||
let g:ctrlp_user_command = ['.git/', 'git --git-dir=%s/.git ls-files -oc --exclude-standard']
|
||||
nnoremap <leader>b :CtrlPBuffer<cr>
|
||||
nnoremap <leader>t :CtrlPTag<cr>
|
||||
nnoremap <leader>f :CtrlPBufTag<cr>
|
||||
nnoremap <leader>q :CtrlPQuickfix<cr>
|
||||
nnoremap <leader>m :CtrlPMRU<cr>
|
||||
|
||||
" buffers and quickfix
|
||||
function! ToggleQuickFix()
|
||||
if empty(filter(getwininfo(), 'v:val.quickfix'))
|
||||
copen
|
||||
else
|
||||
cclose
|
||||
endif
|
||||
endfunction
|
||||
nnoremap <leader>w :call ToggleQuickFix()<cr>
|
||||
nnoremap <leader>d :bd<cr>
|
||||
|
||||
" searching ang grepping
|
||||
nnoremap <leader>g :copen<cr>:Ggrep!<SPACE>
|
||||
nnoremap K :Ggrep "\b<C-R><C-W>\b"<cr>:cw<cr>
|
||||
nnoremap <leader>s :set hlsearch! hlsearch?<cr>
|
||||
|
||||
" ctags generation
|
||||
nnoremap <leader>c :!ctags -R .<cr><cr>
|
||||
|
||||
" per-project configs
|
||||
set exrc
|
||||
set secure
|
||||
```
|
||||
|
||||
### 使用逗号作为引导键
|
||||
|
||||
我喜欢把我的 `引导键` 映射成逗号 `,`,而不是默认的反斜杠 `\`。当你的手处于书写位置时,它是 Vim 中最接近的自由键。另外,这个键在大多数键盘布局中都是一样的,而 `\` 在每个型号或布局都不一样。我很少使用 `本地引导键`,但下划线 `_` 看起来很合适。
|
||||
|
||||
延伸阅读:
|
||||
|
||||
* 参见 [Vim 参考手册][2] 中的 `:help map-which-keys`。
|
||||
* 参见 [Vim Tips Wiki][3] 中的 Vim 中未使用的键。
|
||||
|
||||
### 文件类型和关闭语法高亮
|
||||
|
||||
接下来是非常重要的 `filetype` 命令。看,Vim 自带“内置电池”,8.2 版本包含 644 种语言的语法高亮,251 个文件类型定义(`ftplugins`),以及 138 种语言的缩进规则。然而,缩进在默认情况下是不启用的,也许是为了给所有人提供一个一致的编辑体验。我喜欢启用它。
|
||||
|
||||
一个简单的技巧:如果你正在编辑一个非常大的文件,并且 Vim 感觉很慢,你可能想禁用语法高亮来加快速度。只要输入 `:syn off` 命令即可。
|
||||
|
||||
延伸阅读:
|
||||
|
||||
* 参见 [Vim 参考手册][4] 中的 `:help filetype`。
|
||||
* 参见 [Vim 参考手册][5] 中的 `:help syntax`。
|
||||
* 参见 [Vim 参考手册][6] 中的 `:help indent`。
|
||||
|
||||
### Matchit 插件
|
||||
|
||||
Vim 甚至额外带有使得一些功能不兼容的插件,其中一个相当有用。它就是 `matchit` 插件,它使按下 `%` 键可以在某些语言中查找匹配的括号。通常情况下,你可以找到一个块的开始或结束(开始和结束括号)或 HTML 匹配标签及类似的。
|
||||
|
||||
延伸阅读:
|
||||
|
||||
* 参见 [Vim 参考手册][7] 中的 `:help matchit`。
|
||||
|
||||
### 交换文件
|
||||
|
||||
我想从我的旧配置中保留的许多设置之一是使用 `/tmp` 进行交换,并在我的家目录的一个单独目录中创建备份,你需要用 `mkdir ~/.vimbackup` 来创建这个目录。重要的是要明白,当你开始编辑时,Vim 会创建一个名为 “交换文件” 的副本,所有未保存的工作都会保存在这个文件中。所以即使停电了,你的交换文件也包含了大部分未保存的工作。我更喜欢使用 `tmpfs`,因为我所有的笔记本电脑和服务器都有 UPS 保护,而且我经常保存。另外,大多数情况下,你会使用到交换文件是当你的 SSH 连接丢失而不是由于停电时。对于大文件来说,交换文件可能相当大,我很珍视我的固态硬盘,所以我决定这样做。如果你不确定,可以删除这句话,使用 `/var/tmp`,这样更安全。
|
||||
|
||||
延伸阅读;
|
||||
|
||||
* 参见 [Vim 参考手册][8] 中的 `:help swap-file`。
|
||||
|
||||
### 模糊寻找插件
|
||||
|
||||
现在,模糊查找是一个我不能没有的插件。在服务器上当你每天需要打开 20 个文件时,使用 `:Ex` 或 `:e` 或 `:tabe` 等命令打开文件是没问题的。而当编码时,我通常需要打开数百个文件。正如我所说,CtrlP 很好地完成了这项工作。它很小,没有依赖性,纯 Vim。它用 `Ctrl + P` 组合键打开,这对我来说有点奇怪。我知道一些著名的编辑器(我记得是 VSCode)使用这个组合键。问题是,这已经是很重要的 Vim 绑定键,我不想覆盖它。所以对我来说,赢家是 `引导键 + 引导键`(逗号按两次)。
|
||||
|
||||
`ctrlp_user_command` 只是改变了 CtrlP 获取文件列表的方式。它不使用内置的递归文件列表(glob),而是使用 `git ls-files`,这通常更好,因为它忽略了 `.gitignore` 中的东西,所以像 `node_modules` 或其他可能拖慢列表的不相关目录不会受到影响。
|
||||
|
||||
使用 `引导键` + `B`/`T`/`F`/`Q`/`M` 来打开缓冲区、标签、当前文件的标签、快速修复缓冲区和最近使用的文件的列表,非常有用。具体来说,一旦你用 `ctags` 生成了标签列表,这基本上就是数百种编程语言的“去……定义处”,而且不需要插件!这都是 Vim 内置的。现在澄清一下,当我说输入 `引导键 + B` 时,是指按下逗号,然后按 `B` 键,而不是像用 `Control` 或 `Shift` 那样一起按。
|
||||
|
||||
延伸阅读:
|
||||
|
||||
* 参见 [Vim 参考手册][9] 中的 `:help Explore`。
|
||||
* 参见 [ctrlp.vim GitHub][10]。
|
||||
|
||||
### 缓冲区管理
|
||||
|
||||
虽然现在 Vim 支持标签,但缓冲区管理是掌握 Vim 的一个重要技能。我通常会有很多缓冲区,我需要经常做 `:bdelete`。那么,`引导键 + D` 似乎是一个不错的选择,可以更快地完成这个任务。我也喜欢关闭 Quickfix 窗口,所以也有 `引导键 + W` 的组合键,我在浏览搜索结果时经常使用这个功能。
|
||||
|
||||
延伸阅读:
|
||||
|
||||
* 参见 [Vim 参考手册][11] 中的 `:help buffer-hidden`。
|
||||
|
||||
### Ggrep 和 fugitive 插件
|
||||
|
||||
说到搜索,它和打开文件一样重要。我希望能够对代码库进行检索。为此,有一个来自 fugitive 插件的很棒的 `:Ggrep` 命令,它使用 `git grep`,忽略了垃圾文件,只搜索 Git 中的内容。由于 `Shift + K` 是 Vim 中的一个自由键,它非常适用于自动检索光标位置的词语。最后,能够使用 `引导键 + G` 输入任意的搜索模式也很好。注意,这将打开一个叫做 Quickfix 的窗口,你可以在这里浏览结果、查看下一个/上一个/最后一个/第一个出现的地方,等等。这个窗口也用于编译器或其他工具的输出,所以要熟悉它。如果你对此感到陌生,我建议进一步阅读文档。
|
||||
|
||||
延伸阅读:
|
||||
|
||||
* 参见 [Vim 参考手册][12] 中的 `:help quickfix`。
|
||||
* 参见 [vim-fugitive GitHub][13]。
|
||||
|
||||
### 用 fugitive 进行搜索、检索
|
||||
|
||||
顺便说一下,用 `/` 键搜索是智能和大小写敏感的,这意味着如果所有的搜索字符都是小写的,Vim 的搜索会忽略大小写。默认情况下,它会高亮显示结果,我觉得我已经敲了无数次的 `:noh`(来关闭高亮显示)。这就是为什么我有 `引导键 + S` 来切换高亮显示。我建议以后也多读读手册中关于搜索的内容。
|
||||
|
||||
接下来是搜索、检索。fugitive 插件已经为你提供了。使用命令 `:Ggrep pattern` 来进行 `git grep`,结果会进入 Quickfix 窗口。然后简单地使用快速修复命令(`:cn`、`:cp` 等等)浏览结果,或者简单地使用 `:CtrlPQuickfix`(`引导键 + Q`)来直观地滚动它们。CtrlP 的快速修复整合的酷炫之处是,你可以通过输入以匹配文件名或内容来进一步在搜索结果中搜索。
|
||||
|
||||
延伸阅读:
|
||||
|
||||
* 参见 [Vim 参考手册][14] 中的 `:help grep`。
|
||||
* 参见 [Vim 参考手册][15] 中的 `:help noh`。
|
||||
* 参见 [vim-fugitive GitHub][13] 。
|
||||
|
||||
### Ctags
|
||||
|
||||
`引导键 + C` 可以生成一个 ctags 文件,以便更好地导航,这在处理一个新的代码库或做一个有很多跳转的较长的编码任务时很有用。ctags 支持数百种语言,而 Vim 可以利用所有这些知识来导航。后面会有更多关于如何配置它的内容。注意我已经讨论过 `引导键 + T` 来打开所有标签的模糊搜索,记得吗?这两个是非常相同的。
|
||||
|
||||
延伸阅读:
|
||||
|
||||
* 参见 [Vim 参考手册][16] 中的 `:help ctags`。
|
||||
* 参见 [Universal Ctags 网站][17]。
|
||||
|
||||
### 按键映射
|
||||
|
||||
能够通过在项目目录下创建一个 `.vimrc` 文件来覆盖该项目中的任何设置是一个好主意。只要把它放在(全局的) `.gitignore` 中,以确保你不需要在每个项目中编辑成千上万的 `.gitignore` 文件。这样的一个项目的 `.vimrc` 可以是这样的(对于使用 GNU Makefile 的 C/C++ 项目):
|
||||
|
||||
```
|
||||
" coding style
|
||||
set tabstop=4
|
||||
set softtabstop=4
|
||||
set shiftwidth=4
|
||||
set noexpandtab
|
||||
" include and autocomplete path
|
||||
let &path.="/usr/local/include"
|
||||
" function keys to build and run the project
|
||||
nnoremap <F9> :wall!<cr>:make!<cr><cr>
|
||||
nnoremap <F10> :!LD_LIBRARY_PATH=/usr/local/lib ./project<cr><cr>
|
||||
```
|
||||
|
||||
正如你所看到的,我通常将 `F2` 到 `F10` 等键映射到编译、运行、测试和类似的操作。用 `F9` 来调用 `make`,听起来不错。还记得 MS-DOS 上的蓝色 Borland IDE 吗?
|
||||
|
||||
如前所述,在全局范围内忽略 `.vimrc` 和(由 `ctags` 生成的)`tags` 是个好主意,所以不需要每次都更新 `.gitignore`:
|
||||
|
||||
```
|
||||
# git config --global core.excludesfile ~/.gitignore
|
||||
# cat ~/.gitignore
|
||||
/.vimrc
|
||||
/tags
|
||||
/TAGS
|
||||
```
|
||||
|
||||
在我的个人配置中还有几条只与那些非美国键盘布局的人有关(我用捷克语)。我需要用“死键”来输入许多字符(LCTT 译注:“死键”是一种通过将变音符号与后面的字母结合起来打出重音字符的方法。这种方法在历史上被用于机械打字机),这根本不可能,我宁愿输入命令而不是按那些难以按下的组合键。这里有一个解决问题的办法:
|
||||
|
||||
```
|
||||
" CTRL-] is hard on my keyboard layout
|
||||
map <C-K> <C-]>
|
||||
" CTRL-^ is hard on my keyboard layout
|
||||
nnoremap <F1> :b#<cr>
|
||||
nnoremap <F2> :bp<cr>
|
||||
nnoremap <F3> :bn<cr>
|
||||
" I hate entering Ex mode by accident
|
||||
map Q <Nop>
|
||||
```
|
||||
|
||||
延伸阅读:
|
||||
|
||||
* 参见 [Vim 参考手册][18] 中的 `:help map`。
|
||||
|
||||
功能键在 Vim 中都是自由的,除了 `F1`,它被绑定在帮助上。我不需要帮助,并不是说我已经会对 Vim 了如指掌,并不是。但如果需要的话,我可以简单地输入 `:help`。而 `F1` 是一个关键的键,离 `Esc` 键如此之近。我喜欢将它用于缓冲区交换(`:b#`),将 `F2`/`F3` 用作下一个/上一个。你越是与缓冲区打交道,你就越需要这个。如果你没有使用过 `Ctrl + ^`,我建议你要习惯于它。哦,你有没有丑陋地输入 `:visual` 进入过 Ex 模式?许多初学者都不知道如何从该模式下退出 Vim。对我来说,这就是打扰,因为我很少使用它。
|
||||
|
||||
现在,熟悉 `ctags` 是成功使用 Vim 的一个关键因素。这个工具支持数百种语言,它不小心就为你不想创建标签的文件创建它,因此我建议忽略典型的垃圾目录:
|
||||
|
||||
```
|
||||
# cat ~/.ctags.d/local.ctags
|
||||
--recurse=yes
|
||||
--exclude=.git
|
||||
--exclude=build/
|
||||
--exclude=.svn
|
||||
--exclude=vendor/*
|
||||
--exclude=node_modules/*
|
||||
--exclude=public/webpack/*
|
||||
--exclude=db/*
|
||||
--exclude=log/*
|
||||
--exclude=test/*
|
||||
--exclude=tests/*
|
||||
--exclude=\*.min.\*
|
||||
--exclude=\*.swp
|
||||
--exclude=\*.bak
|
||||
--exclude=\*.pyc
|
||||
--exclude=\*.class
|
||||
--exclude=\*.cache
|
||||
```
|
||||
|
||||
### Airline 插件
|
||||
|
||||
我一定不能忘记 Vim 的 Airline 插件。在 Fedora 的两个插件中,这个插件很轻量级,不需要外部依赖,而且可以开箱即用我所有的字体。你可以定制它,而且还有主题之类的东西。我只是碰巧喜欢它的默认设置。
|
||||
|
||||
我必须提到,有两个主要的 Ctags 项目:Exuberant Ctags 和 Universal Ctags。后者是一个更现代的复刻。如果你的发行版有,就用它。如果你在 Fedora 35+ 上,你应该知道你现在用的是 Universal Ctags。
|
||||
|
||||
### 总结
|
||||
|
||||
作为总结,我的建议是这样的。尽量保持你的 Vim 配置流畅和干净。这将在未来得到回报。在我转换到新配置之后,我不得不重新学习“写入并退出”的命令,因为我总是不小心把它打成 `:Wq`,而我在旧的配置里有一个“小技巧”,让它实际上按我的意思工作。好吧,这个可能真的很有用,并能入选,我希望你能明白我的意思:
|
||||
|
||||
```
|
||||
:command Wq wq
|
||||
:command WQ wq
|
||||
```
|
||||
|
||||
最后的一个快速技巧是:你可能需要经常改变你的默认 Vim 配置,来找到我在这里向你介绍的和你自己口味之间的舒适区。使用下面的别名,这样你就不需要一直搜索历史。相信我,当一个 Vim 用户在命令历史里搜索 “vim” 时,找不到什么是相关的内容:
|
||||
|
||||
```
|
||||
alias vim-vimrc='vim ~/.vimrc'
|
||||
```
|
||||
|
||||
就是这些了。也许这可以帮助你在没有大量插件的情况下在 Vim 的丰富世界遨游。“简简单单” 的 Vim 也很不错!
|
||||
|
||||
要尝试你刚刚读到的内容,请安装软件包并检出这些配置:
|
||||
|
||||
```
|
||||
test -f ~/.vimrc && mv ~/.vimrc ~/.vimrc.backup
|
||||
curl -s https://raw.githubusercontent.com/lzap/vim-lzap/master/.vimrc -o ~/.vimrc
|
||||
mkdir ~/.vimbackup
|
||||
```
|
||||
|
||||
特别感谢 Marc Deop 和 [Melanie Corr][19] 对本文的审阅。
|
||||
|
||||
### 更新
|
||||
|
||||
我已经在这种配置下生存下来了!我唯一的纠结是 CtrlP 插件的结果顺序不同。文件的模糊算法与 `fzf.vim` 插件不同,所以我以前用各种搜索词能找到的文件现在找不到了。我最后安装了 Fedora 的 fzf 包以获得更相关的文件搜索,它附带了一个 vim 函数 `FZF`,可以绑定到引导键组合上。请看我的 [GitHub 仓库][20] 中更新后的配置文件。一路走来,我学到了很多东西。有一些键的绑定我已经忘记了,这要感谢许多插件。
|
||||
|
||||
这篇文章最初发表在 [作者的网站][21] 上,经许可后重新发表。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/21/12/vanilla-vim-config
|
||||
|
||||
作者:[Lukáš Zapletal][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[wxy](https://github.com/wxy)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/lzap
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/coffee_tea_laptop_computer_work_desk.png?itok=D5yMx_Dr (Person drinking a hot drink at the computer)
|
||||
[2]: https://vimhelp.org/map.txt.html#map-which-keys
|
||||
[3]: https://vim.fandom.com/wiki/Unused_keys
|
||||
[4]: https://vimhelp.org/filetype.txt.html
|
||||
[5]: https://vimhelp.org/syntax.txt.html
|
||||
[6]: https://vimhelp.org/indent.txt.html
|
||||
[7]: https://vimhelp.org/usr_05.txt.html#matchit-install
|
||||
[8]: https://vimhelp.org/recover.txt.html#swap-file
|
||||
[9]: https://vimhelp.org/pi_netrw.txt.html#netrw-explore
|
||||
[10]: https://github.com/kien/ctrlp.vim
|
||||
[11]: https://vimhelp.org/windows.txt.html#buffer-hidden
|
||||
[12]: https://vimhelp.org/quickfix.txt.html
|
||||
[13]: https://github.com/tpope/vim-fugitive
|
||||
[14]: https://vimhelp.org/quickfix.txt.html#grep
|
||||
[15]: https://vimhelp.org/pattern.txt.html#noh
|
||||
[16]: https://vimhelp.org/tagsrch.txt.html
|
||||
[17]: https://ctags.io
|
||||
[18]: https://vimhelp.org/map.txt.html
|
||||
[19]: https://opensource.com/users/melanie-corr
|
||||
[20]: https://github.com/lzap
|
||||
[21]: https://lukas.zapletalovi.com/2021/11/a-sane-vim-configuration-for-fedora.html
|
@ -0,0 +1,87 @@
|
||||
[#]: subject: "13 examples of how DevOps facilitated transformation in 2021"
|
||||
[#]: via: "https://opensource.com/article/22/1/devops-transformation"
|
||||
[#]: author: "Will Kelly https://opensource.com/users/willkelly"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "CN-QUAN "
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14323-1.html"
|
||||
|
||||
2021 总结:DevOps 促进转型的 13 个例子
|
||||
======
|
||||
|
||||
> 2021 年,我们的顶级 DevOps 文章聚焦于工具、最佳实践和最关键的部分:转型。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202203/03/112426i6am9jokk88z9n89.jpg)
|
||||
|
||||
2021 年对于 DevOps 来说是激动人心的一年,开发团队不断适应远程和混合工作模式。这一年最受欢迎的 DevOps 文章展示了我们的社区如何关注工具、创新、最佳实践和转型。
|
||||
|
||||
### DevOps 工具和创新
|
||||
|
||||
该行业的工具仍然是读者的首选读物。[Nimisha Mukherjee][2] 是红帽的一名工程经理,她编写了 [面向开发人员的 13 个开源工具][3]。她将工具分为“内环”和“外环”两个部分,“内环”是开发人员最常见的任务,“外环”是开发人员的代码通过持续集成和交付(CI/CD)部署到生产环境的地方。
|
||||
|
||||
我们的读者对实现 DevOps 工具链的兴趣也很高。首次投稿的 [Tereza Denkova][4] 是一家 IT 专业服务公司 Accedia 的营销助理,他撰写了 [如何实现 DevOps 工具链][5],并将其与创新紧密联系在一起。
|
||||
|
||||
### DevOps 实践
|
||||
|
||||
[Daniel Oh][6] 是我们的主要支持者,也是一位多产的内容创作者,他写了 [2021 年需要关注的 3 个无服务器策略][7],概述了当今无服务器应用程序开发和部署方法是如何加速采用 DevApps 实践的。
|
||||
|
||||
[Evan “Hippy” Satis][8] 在他的文章 [解决 CI/CD 中的存储库阻抗不匹配][9] 中提供了调整部署映像和描述符的策略。他是红帽公司的高级顾问,他在文章中采用的有条不紊的方法证明了他的行业经验。另外,请参阅他的文章 [在 shell 中处理模块化和动态配置文件][10]。
|
||||
|
||||
在我的文章 [DevOps 文档指南][11] 中,我提出了让文档成为 DevOps 讨论的一部分的理由。我从读者那里得到了一些有见地的评论,因此我正在为未来的一篇文章跟进这些评论。
|
||||
|
||||
### DevOps 转型
|
||||
|
||||
我们有时不相信 DevOps 能够适应组织需求。理解其他形式的运维的潜在影响是非常必要的,这些运维可能在现在或将来补充或增强 DevOps。[Bryant Son][12],一个自称是<ruby>章鱼猫<rt>Octocat</rt></ruby>的人,在 [GitOps 和 DevOps 有何不同?][13] 中提出 GitOps 是 DevOps 的进化形式。
|
||||
|
||||
[Mike Calizo][14] 是新西兰奥克兰的一位红帽公司解决方案架构师,他撰写了 [如何成功采用 DevSecOps][15]。本文将介绍他作为解决方案架构师的经验。他解释了在你迁移到 DevSecOps 的过程中可能会遇到的一些安全挑战。
|
||||
|
||||
我写了一系列关于 DevOps 到 DevSecOps 转型的文章。它们是:
|
||||
|
||||
* [启动从 DevOps 到 DevSecOps 的转型][16]
|
||||
* [开始 DevSecOps 转型的 3 个阶段][17]
|
||||
* [遵循 DevSecOps 成熟度模型][18]
|
||||
* [DevSecOps 转型的另外 3 个阶段][19]
|
||||
* [使 DevSecOps 的采用成为团队努力的 4 个步骤][20]
|
||||
|
||||
### 2022 年和 DevOps 的未来
|
||||
|
||||
看到 DevOps 的文章登上了 2021 年最受欢迎的名单,说明 DevOps 将迎来一个更加有趣的 2022 年,因为组织正在继续掌握他们的工具,改进他们的战略,并继续他们的 [数字化转型][21],以便在不断变化的市场中有效地竞争。
|
||||
|
||||
感谢所有阅读我们的 DevOps 文章、喜欢这些文章,并通过网站和社交媒体给我们发送评论的人。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/1/devops-transformation
|
||||
|
||||
作者:[Will Kelly][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[CN-QUAN](https://github.com/CN-QUAN)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/willkelly
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/gears_devops_learn_troubleshooting_lightbulb_tips_520.png?itok=HcN38NOk (Tips and gears turning)
|
||||
[2]: https://opensource.com/users/nimisha
|
||||
[3]: https://opensource.com/article/21/6/open-source-developer-tools
|
||||
[4]: https://opensource.com/users/tereza-denkova
|
||||
[5]: https://opensource.com/article/21/1/devops-tool-chain
|
||||
[6]: https://opensource.com/users/daniel-oh
|
||||
[7]: https://opensource.com/article/21/1/devapps-strategies
|
||||
[8]: https://opensource.com/users/hippyod
|
||||
[9]: https://opensource.com/article/21/8/impedance-mismatch-cicd
|
||||
[10]: https://opensource.com/article/21/5/processing-configuration-files-shell
|
||||
[11]: https://opensource.com/article/21/3/devops-documentation
|
||||
[12]: https://opensource.com/users/brson
|
||||
[13]: http://opensource.com/article/21/3/gitops
|
||||
[14]: https://opensource.com/users/mcalizo
|
||||
[15]: https://opensource.com/article/21/2/devsecops
|
||||
[16]: http://opensource.com/article/21/10/devops-to-devsecops
|
||||
[17]: https://opensource.com/article/21/10/first-phases-devsecops-transformation
|
||||
[18]: https://opensource.com/article/21/10/devsecops-maturity-model
|
||||
[19]: https://opensource.com/article/21/10/last-phases-devsecops-transformation
|
||||
[20]: https://opensource.com/article/21/10/devsecops-team-effort
|
||||
[21]: https://enterprisersproject.com/what-is-digital-transformation
|
||||
|
@ -0,0 +1,218 @@
|
||||
[#]: subject: "Bash Shell Scripting for beginners (Part 3)"
|
||||
[#]: via: "https://fedoramagazine.org/bash-shell-scripting-for-beginners-part-3"
|
||||
[#]: author: "Matthew Darnell https://fedoramagazine.org/author/zexcon/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "wxy"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14313-1.html"
|
||||
|
||||
Bash Shell 脚本新手指南(三)
|
||||
======
|
||||
|
||||
![][1]
|
||||
|
||||
欢迎来到面向初学者的 Bash Shell 脚本知识第三部分。这最后一篇文章将再来学习一些知识点,这些将使你为持续的个人发展做好准备。它将涉及到函数、用 `if`/`elif` 语句进行比较,并以研究 `while` 循环作为结尾。
|
||||
|
||||
### 函数
|
||||
|
||||
让我们从一个看似困难但其实很简单的基本概念开始,即函数。把它看作是一种简单的方法,可以把脚本中被反复使用的部分放到一个可重复使用的组中。你在本系列第一篇或第二篇文章中所做的任何事情都可以放在一个函数中。因此,让我们把一个函数放到我们的 `learnToScript.sh` 文件中。让我指出几个关键点。你将需要为你的函数起一个名字、一对小括号,以及用大括号包围放在你的函数中的命令。
|
||||
|
||||
```
|
||||
#!/bin/bash
|
||||
|
||||
#A function to return an echo statement.
|
||||
helloFunc() {
|
||||
echo "Hello from a function."
|
||||
}
|
||||
|
||||
#invoke the first function helloFunc()
|
||||
helloFunc
|
||||
```
|
||||
|
||||
你会看到如下输出结果:
|
||||
|
||||
```
|
||||
[zexcon@fedora ~]$ ./learnToScript.sh
|
||||
Hello from a function.
|
||||
[zexcon@fedora ~]$
|
||||
```
|
||||
|
||||
函数是重复使用一组命令的好方法,但如果你能使它们在每次使用时对不同的数据进行操作,它们会更加有用。这就要求你在每次调用函数时提供数据,这称为参数。
|
||||
|
||||
要提供参数,你只需在调用函数时把它们加在函数名称后面。为了使用你提供的数据,你在函数命令中使用位置来引用它们。它们将被命名为 `$1`、`$2`、`$3`,以此类推,这取决于你的函数将需要多少个参数。
|
||||
|
||||
让我们修改上一个例子来帮助更好地理解这个问题。
|
||||
|
||||
```
|
||||
#!/bin/bash
|
||||
|
||||
#A function to return an echo statement.
|
||||
helloFunc() {
|
||||
echo "Hello from a function."
|
||||
echo $1
|
||||
echo $2
|
||||
echo "You gave me $# arguments"
|
||||
}
|
||||
|
||||
#invoke the function helloFunc()
|
||||
helloFunc "How is the weather?" Fine
|
||||
```
|
||||
|
||||
输出如下:
|
||||
|
||||
```
|
||||
Hello from a function.
|
||||
How is the weather?
|
||||
Fine
|
||||
You gave me 2 arguments
|
||||
```
|
||||
|
||||
输出中发生的事情是 `helloFunc()` 在每一行都做了一个回显。首先它回显了一个 `Hello from a function`,然后它继续回显变量 `$1` 的值,结果是你传递给 `helloFunc` 的 `"How is the weather?"`。然后它将继续处理变量 `$2`,并回显其值,这是你传递的第二个项目:`Fine`。该函数将以回显 `You gave me $# arguments` 结束。注意,第一个参数是一个用双引号括起来的单个字符串 `"How is the weather?"`。第二个参数 `Fine` 没有空格,所以不需要引号。
|
||||
|
||||
除了使用 `$1`、`$2` 等之外,你还可以通过使用变量 `$#` 来确定传递给函数的参数数量。这意味着你可以创建一个接受可变参数数量的函数。
|
||||
|
||||
关于 bash 函数的更多细节,网上有很多好的参考资料。[这里有一个可以让你入门的资料][2]。
|
||||
|
||||
我希望你能了解到函数如何在你的 bash 脚本中提供巨大的灵活性。
|
||||
|
||||
### 数值比较 []
|
||||
|
||||
如果你想进行数字比较,你需要在方括号 `[]` 中使用以下运算符之一:
|
||||
|
||||
- `-eq` (等于)
|
||||
- `-ge` (等于或大于)
|
||||
- `-gt` (大于)
|
||||
- `-le` (小于或等于)
|
||||
- `-lt` (小于)
|
||||
- `-ne` (不相等)
|
||||
|
||||
因此,举例来说,如果你想看 12 是否等于或小于 25,可以像 `[ 12 -le 25 ]` 这样。当然,12 和 25 可以是变量。例如,`[ $twelve -le $twentyfive ]`。(LCTT 译注:注意保留方括号和判断语句间的空格)
|
||||
|
||||
### if 和 elif 语句
|
||||
|
||||
那么让我们用数字比较来介绍 `if` 语句。Bash 中的 `if` 语句将以 `if` 开始, 以 `fi` 结束。`if` 语句 以 `if` 开始,然后是你想做的检查。在本例中,检查的内容是变量 `numberOne` 是否等于 `1`。如果 `numberOne` 等于 `1`,将执行 `then` 语句,否则将执行 `else` 语句。
|
||||
|
||||
```
|
||||
#!/bin/bash
|
||||
|
||||
numberTwelve=12
|
||||
|
||||
if [ $numberTwelve -eq 12 ]
|
||||
then
|
||||
echo "numberTwelve is equal to 12"
|
||||
elif [ $numberTwelve -gt 12 ]
|
||||
then
|
||||
echo "numberTwelve variable is greater than 12"
|
||||
else
|
||||
echo "neither of the statemens matched"
|
||||
fi
|
||||
```
|
||||
|
||||
输出如下:
|
||||
|
||||
```
|
||||
[zexcon@fedora ~]$ ./learnToScript.sh
|
||||
numberTwelve variable is equal to 12
|
||||
```
|
||||
|
||||
你所看到的是 `if` 语句的第一行,它在检查变量的值是否真的等于 `12`。如果是的话,语句就会停止,并发出 `numberTwelve is equal to 12` 的回显,然后在 `fi` 之后继续执行你的脚本。如果变量大于 `12` 的话,就会执行 `elif` 语句,并在 `fi` 之后继续执行。当你使用 `if` 或 `if`/`elif` 语句时,它是自上而下工作的。当第一条语句是匹配的时候,它会停止并执行该命令,并在 `fi` 之后继续执行。
|
||||
|
||||
### 字符串比较 [[]]
|
||||
|
||||
这就是数字比较。那么字符串的比较呢?使用双方括号 `[[]]` 和以下运算符等于或不等于。(LCTT 译注:注意保留方括号和判断语句间的空格)
|
||||
|
||||
- `=` (相等)
|
||||
- `!=` (不相等)
|
||||
|
||||
请记住,字符串还有一些其他的比较方法,我们这里不会讨论,但可以深入了解一下它们以及它们是如何工作的。
|
||||
|
||||
```
|
||||
#!/bin/bash
|
||||
|
||||
#variable with a string
|
||||
stringItem="Hello"
|
||||
|
||||
#This will match since it is looking for an exact match with $stringItem
|
||||
if [[ $stringItem = "Hello" ]]
|
||||
then
|
||||
echo "The string is an exact match."
|
||||
else
|
||||
echo "The strings do not match exactly."
|
||||
fi
|
||||
|
||||
#This will utilize the then statement since it is not looking for a case sensitive match
|
||||
if [[ $stringItem = "hello" ]]
|
||||
then
|
||||
echo "The string does match but is not case sensitive."
|
||||
else
|
||||
echo "The string does not match because of the capitalized H."
|
||||
fi
|
||||
```
|
||||
|
||||
你将得到以下三行:
|
||||
|
||||
```
|
||||
[zexcon@fedora ~]$ ./learnToScript.sh
|
||||
The string is an exact match.
|
||||
The string does not match because of the capitalized H.
|
||||
[zexcon@fedora ~]$
|
||||
```
|
||||
|
||||
### while 循环
|
||||
|
||||
在结束这个系列之前,让我们看一下循环。一个关于 `while` 循环的例子是:“当 1个数值 小于 10 时,在数值上加 1”,你继续这样做直到该判断语句不再为真。下面你将看到变量 `number` 设置为 `1`。在下一行,我们有一个 `while` 语句,它检查 `number` 是否小于或等于 `10`。在 `do` 和 `done` 之间包含的命令被执行,因为 `while` 的比较结果为真。所以我们回显一些文本,并在 `number` 的值上加 `1`。我们继续执行,直到 `while` 语句不再为真,它脱离了循环,并回显 `We have completed the while loop since $number is greater than 10.`。
|
||||
|
||||
```
|
||||
#!/bin/bash
|
||||
|
||||
number=1
|
||||
|
||||
while [ $number -le 10 ]
|
||||
do
|
||||
echo "We checked the current number is $number so we will increment once"
|
||||
((number=number+1))
|
||||
done
|
||||
echo "We have completed the while loop since $number is greater than 10."
|
||||
|
||||
```
|
||||
|
||||
`while` 循环的结果如下:
|
||||
|
||||
```
|
||||
[zexcon@fedora ~]$ ./learnToScript.sh
|
||||
We checked the current number is 1 so we will increment once
|
||||
We checked the current number is 2 so we will increment once
|
||||
We checked the current number is 3 so we will increment once
|
||||
We checked the current number is 4 so we will increment once
|
||||
We checked the current number is 5 so we will increment once
|
||||
We checked the current number is 6 so we will increment once
|
||||
We checked the current number is 7 so we will increment once
|
||||
We checked the current number is 8 so we will increment once
|
||||
We checked the current number is 9 so we will increment once
|
||||
We checked the current number is 10 so we will increment once
|
||||
We have completed the while loop since 11 is greater than 10.
|
||||
[zexcon@fedora ~]$
|
||||
```
|
||||
|
||||
正如你所看到的,实现这一目的所需的脚本量要比用 `if` 语句不断检查每个数字少得多。这就是循环的伟大之处,而 `while` 循环只是众多方式之一,它以不同的方式来满足你的个人需要。
|
||||
|
||||
### 总结
|
||||
|
||||
下一步是什么?正如文章所指出的,这是,面向 Bash Shell 脚本初学者的。希望我激发了你对脚本的兴趣或终生的热爱。我建议你去看看其他人的脚本,了解你不知道或不理解的地方。请记住,由于本系列每篇文章都介绍了数学运算、比较字符串、输出和归纳数据的多种方法,它们也可以用函数、循环或许多其他方法来完成。如果你练习所讨论的基础知识,你将会很开心地把它们与你还要学习的所有其他知识结合起来。试试吧,让我们在 Fedora Linux 世界里见。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://fedoramagazine.org/bash-shell-scripting-for-beginners-part-3
|
||||
|
||||
作者:[Matthew Darnell][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[wxy](https://github.com/wxy)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://fedoramagazine.org/author/zexcon/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://fedoramagazine.org/wp-content/uploads/2021/11/bash_shell_scripting_pt3-816x345.jpg
|
||||
[2]: https://opensource.com/article/20/6/bash-functions
|
@ -0,0 +1,131 @@
|
||||
[#]: subject: "Interesting KDE Facts and Trivia that You Should Know About"
|
||||
[#]: via: "https://www.debugpoint.com/2021/12/kde-facts-trivia/"
|
||||
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "wxy"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14299-1.html"
|
||||
|
||||
一些 KDE 趣闻和历史
|
||||
======
|
||||
|
||||
> 当我们回顾过去,发现了一些有点“酷”的 KDE 趣闻。如下。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202202/23/193047v98lqj2mja9asvmj.jpg)
|
||||
|
||||
KDE 有很长的历史。它是如何被构思、发展并成为所有用户群的 “首选” 桌面的赢家的呢?在这篇文章中,我们将介绍一些你可能不知道的 KDE 的趣闻。了解一下也很有趣。
|
||||
|
||||
### KDE 趣闻和历史
|
||||
|
||||
#### 缘起
|
||||
|
||||
KDE 是由 [Matthias Ettrich][1] 在 20 多年前创建的。其主要动机是创建一个易于使用的桌面,来替代 <ruby>[通用桌面环境][2]<rt>Common Desktop Environment</rt></ruby>(CDE)。其背后的想法是一个简单的桌面,使用起来很有趣,易于配置且功能强大。于是,KDE(即<ruby>酷桌面环境<rt>Kool Desktop Environment</rt></ruby>)就诞生了。你会注意到这是对 CDE 的双关!名字中的 “Kool” 后来被去掉了,最终变成了 “K 桌面环境”,即 KDE。
|
||||
|
||||
#### 第一次出现
|
||||
|
||||
Matthias 的 KDE 项目正式公告今天 [仍然存在][3] 在 Google 群组的 de.comp.os.linux.misc(Usenet)上。如下:
|
||||
|
||||
![KDE 的首个公告][4]
|
||||
|
||||
今天,当读到上面的想法,以及他对 KDE 是那么有远见,真有点超现实。就这样,KDE Plasma 今天已经渗透到了所有的设备中:笔记本电脑、台式机、游戏机、手机。这的确很了不起。
|
||||
|
||||
#### 第一行代码
|
||||
|
||||
第一行代码是由 Matthias 为窗口管理器 kwm 和面板 kpanel 写的。KDE 的 KConfig 类成为这个神奇的桌面的第一个库。
|
||||
|
||||
#### Qt 许可证的麻烦
|
||||
|
||||
在此期间,在 Usenet 论坛上,许多人反对用来开发 KDE 的 Qt 的许可证。因此,Matthias 和团队在 1997 年 2 月飞往奥斯陆,在 KDE 和 Trolltech(当时 Qt 基金会的所有者)之间签署了一份基金会协议。这保证了 [Qt 的永久免费使用][5]。
|
||||
|
||||
在最初的日子里,不管你信不信,都非常需要钱来维持开发工作的进行。团队从 O'Reilly、SUSE、Trolltech 收到了慷慨的捐赠。
|
||||
|
||||
#### KDE 1.0 - 第一个版本
|
||||
|
||||
被称为 [KDE One][6] 的第一次开发者会议,组织于 1997 年的八、九月间,它讨论了 KDE 第一个版本的愿景、未来和路线图。而这最终在 1998 年 7 月 12 日带来了 KDE 1.0 首次发布。
|
||||
|
||||
KDE 1.0 是建立在 Qt 1.0 之上的,主要是用 C++ 编写的。在我看来,它今天看起来仍然令人惊叹。你可以想象一下,在用户界面、用户交互、以及最重要的 —— 为大众提供一个完美的 Linux 桌面方面,这个愿景是多么先进。
|
||||
|
||||
![K 桌面环境 1.0][7]
|
||||
|
||||
#### KDE 2.0
|
||||
|
||||
2000 年 10 月 23 日 KDE 2.0 发布。它首次引入了一套新的应用程序,包括 Konqueror 网页浏览器、KOffice、主题支持、KParts 等。
|
||||
|
||||
#### 最初获得的奖项
|
||||
|
||||
2001 年 8 月 29 日,KDE 在 <ruby>Linux 世界博览会<rt>LinuxWorldExpo</rt></ruby> 被评为“最佳开源项目”,并获得“开源产品卓越奖”。
|
||||
|
||||
2009 年 7 月 20 日,其开发仓库 SVN 中的源代码抵达了 [第一百万次提交][9]。这的确是一个开源项目的里程碑,它为充满希望的未来铺平了道路。
|
||||
|
||||
![KDE 源代码中的第 100 万次提交片段][10]
|
||||
|
||||
#### 快进到 Plasma 5.0
|
||||
|
||||
<ruby>KDE 软件合集<rt>KDE Software Compilation</rt></ruby>一直使用到 KDE 4.0。在下一个 Plasma 5.0 版本中,它被分割成三个独立的项目:<ruby>KDE 框架<rt>KDE Framework</rt></ruby>、KDE Plasma 和 <ruby>KDE 应用<rt>KDE Applications</rt></ruby>。这有助于 KDE Plasma 桌面本身独立于与 KDE 框架、KDE 应用的发布节奏。这种模块化的方法帮助团队分别保持整个生态系统的质量和进度。
|
||||
|
||||
#### <ruby>KDE 女性<rt>KDE Woman</rt></ruby>
|
||||
|
||||
KDE 社区的女性小组 [KDE 女性][11] 创建于 2001 年 3 月,目标是增加自由软件社区的女性人数,特别是在 KDE,这包括开发、文档和测试等领域。
|
||||
|
||||
#### KDE 吉祥物
|
||||
|
||||
KDE 的官方吉祥物是 <ruby>[康奇][12]<rt>Konqi</rt></ruby>,它是一条可爱的小龙,它的意思是 “<ruby>征服者康奇<rt>Konqi the Konqueror</rt></ruby>”(也是其浏览器 Konqueror 的昵称)。Katie 是 Konqi 的女朋友,也是 KDE 项目的官方吉祥物。
|
||||
|
||||
> Konqi 是<ruby>科迪山谷<rt>KDEValley</rt></ruby>的在任大使。它善于建造就像它善于破坏一样,而当事情变得越加复杂时,它的爬行动物大脑就混乱了。它在<ruby>弗洛斯兰<rt>Flossland</rt></ruby>(自由及开源软件大陆)各地旅行,在各个龙族殖民地之间建立联系。它还会从<ruby>泼泛申瑙海<rt>Professional Ocean</rt></ruby>(专业之海)传信到对面的<ruby>尤思兰德<rt>Userland</rt></ruby>(用户大陆)。它有时也会做这样的梦,梦见自己成为一只强壮的大龙。这是它过去的生活吗?
|
||||
>
|
||||
> —— 关于 Konqi 的官方描述
|
||||
|
||||
![Konqi - 官方 KDE 吉祥物][13]
|
||||
|
||||
#### KDE 走向更多设备和充满希望的未来的旅程
|
||||
|
||||
多年来,KDE Plasma 成为各种硬件的首选桌面。2016 年,KDE 与一家西班牙笔记本电脑公司合作,推出了 [KDE Slimbook][14],它是一款安装了 KDE Neon 发行版的超极本,带有 KDE Plasma,预装了 KDE 应用程序。可以从他们的网站上购买。
|
||||
|
||||
Linux 移动设备先锋 Pine64 在 2020 年推出了 [PinePhone KDE 版][15],它带有 KDE Plasma 移动版。
|
||||
|
||||
Valve 公司宣布他们的手持游戏机 Steam Deck 采用了 [KDE Plasma][16],运行于 [Arch Linux][17] 之上。
|
||||
|
||||
![Slimbook 1][18]
|
||||
|
||||
### 结语
|
||||
|
||||
那么,就写到这里吧。这是一些你可能不知道的 KDE 的趣闻。从 KDE 1.0 的那一天起,到今天,它出现在一个简单而强大的由 KDE 驱动的手持游戏设备里,这确实是一个漫长而多彩的旅程。我相信,在未来的日子里,KDE 生态系统一定会发生更多这样令人激动的事件。
|
||||
|
||||
你还知道没有在这里列出的 KDE 趣闻吗?请在下面的评论栏里告诉我。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.debugpoint.com/2021/12/kde-facts-trivia/
|
||||
|
||||
作者:[Arindam][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[wxy](https://github.com/wxy)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.debugpoint.com/author/admin1/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://en.wikipedia.org/wiki/Matthias_Ettrich
|
||||
[2]: https://sourceforge.net/projects/cdesktopenv/
|
||||
[3]: https://groups.google.com/g/de.comp.os.linux.misc/c/SDbiV3Iat_s/m/zv_D_2ctS8sJ
|
||||
[4]: https://www.debugpoint.com/wp-content/uploads/2021/12/KDE-Facts-and-Trivia-The-First-Announcement-1024x528.jpg
|
||||
[5]: https://dot.kde.org/2016/01/13/qt-guaranteed-stay-free-and-open-%E2%80%93-legal-update
|
||||
[6]: https://community.kde.org/KDE_Project_History/KDE_One_(Developer_Meeting)
|
||||
[7]: https://www.debugpoint.com/wp-content/uploads/2021/12/K-Desktop-Environment-1.0.jpg
|
||||
[8]: https://www.debugpoint.com/2020/07/kaos-2020-07-release/
|
||||
[9]: https://marc.info/?l=kde-commits&m=124811211002267&w=2
|
||||
[10]: https://www.debugpoint.com/wp-content/uploads/2021/12/Snippet-of-the-Millionth-Commit-in-KDE-Source-Code.jpg
|
||||
[11]: https://community.kde.org/KDE_Women
|
||||
[12]: https://community.kde.org/Konqi
|
||||
[13]: https://www.debugpoint.com/wp-content/uploads/2021/12/Konqi-The-Official-KDE-Mascot.jpg
|
||||
[14]: https://kde.slimbook.es/
|
||||
[15]: https://www.debugpoint.com/2020/11/pinephone-kde-community-edition-plasma-mobile/
|
||||
[16]: https://www.debugpoint.com/tag/kde-plasma
|
||||
[17]: https://www.debugpoint.com/tag/arch-linux
|
||||
[18]: https://www.debugpoint.com/wp-content/uploads/2020/07/Slimbook-1-1024x576.jpg
|
||||
[19]: https://t.me/debugpoint
|
||||
[20]: https://twitter.com/DebugPoint
|
||||
[21]: https://www.youtube.com/c/debugpoint?sub_confirmation=1
|
||||
[22]: https://facebook.com/DebugPoint
|
@ -0,0 +1,304 @@
|
||||
[#]: subject: "10 Best Apps to Improve Your GNOME Experience [Part 1]"
|
||||
[#]: via: "https://www.debugpoint.com/2021/12/best-gnome-apps-part-1/"
|
||||
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "wxy"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14289-1.html"
|
||||
|
||||
10 个提升 GNOME 体验的最佳应用程序(一)
|
||||
======
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202202/20/171444jog8og4fy1j4eo0h.jpg)
|
||||
|
||||
> 我们将给你详细介绍 10 个最好的 GNOME 应用程序,它们可以帮助你在这个神奇的桌面上顺滑地工作。
|
||||
|
||||
网上有数百个基于 GTK 的应用程序,它们大多没什么名声,不那么流行。这些应用程序被设计用来简化你的 GNOME 桌面体验,提供原生应用程序的感受。本系列文章的目的是为了提高这些应用程序的普及率,同时鼓励更多的用户参与和开发。
|
||||
|
||||
在这个《最佳 GNOME 应用程序》的系列文章中,我们将重点介绍一些或已知道、或不知道的基于 GTK 的原生应用程序,它们是专门为 GNOME 增加功能设计的。
|
||||
|
||||
在这篇文章中,我们介绍了以下 GNOME 应用程序:
|
||||
|
||||
* Geary - 电子邮件客户端
|
||||
* Notejot - 简易笔记
|
||||
* Hydrapaper - 支持多显示器的墙纸
|
||||
* Solanum - 番茄时钟客户端
|
||||
* Cawbird - Twitter 客户端
|
||||
* News Flash - RSS 阅读器
|
||||
* Fragments - BitTorrent 客户端
|
||||
* MetadataCleaner - 清洁各种文件的元数据
|
||||
* Kooha - 屏幕记录器
|
||||
* Metronome - 节拍器
|
||||
|
||||
### Geary - 电子邮件客户端
|
||||
|
||||
当提到 [Linux 桌面上的原生电子邮件客户端][14] 时,大家想到的都是 Thunderbird。然而,如果你想在电子邮件客户端中获得更多的原生感受,那么你可以试试 Geary。Geary 是一个基于 GTK+ 的电子邮件客户端,它带给你的功能包括对话视图、邮件合并、只需两步的轻松设置、支持 IMAP/SMTP、用于撰写邮件的富文本编辑器以及许多很酷的功能。
|
||||
|
||||
你可以轻松地将其配置为你的默认电子邮件客户端,并用自定义配置选项来设置主要的电子邮件服务提供商,如 Gmail、雅虎、Outlook。
|
||||
|
||||
![Geary 电子邮件客户端][15]
|
||||
|
||||
下面是你如何安装它的方法。
|
||||
|
||||
- 适用于 Debian/Ubuntu:`sudo apt install geary`
|
||||
- 适用于 Fedora 和相关发行版:`sudo dnf install geary`
|
||||
- [设置][16] Flatpak,然后 [通过 Flathub 安装][17]
|
||||
|
||||
更多信息:
|
||||
|
||||
* [主页][18]
|
||||
* [源代码][19]
|
||||
|
||||
#### Notejot - 简单笔记
|
||||
|
||||
想要一个“超简单”的 GNOME 记事本应用?那么 Notejot 就是你正在寻找的应用程序。这款灵巧的记事应用程序以其精心制作的直观的单窗口用户界面而显得非常出色。这款应用程序带来的功能包括多个笔记、笔记本功能、彩色笔记、标准文本格式等。这是一个完美的 GNOME 记事小程序。
|
||||
|
||||
![超简单的记事应用程序 Notejot][20]
|
||||
|
||||
- [设置][16] Flatpak,然后 [通过 Flathub 安装][64]
|
||||
|
||||
更多信息:
|
||||
|
||||
* [源代码][21]
|
||||
|
||||
#### Hydrapaper - 用于多显示器的壁纸更换器
|
||||
|
||||
这个 GTK 应用程序对于那些使用多显示器的人来说是一个福音。当你把多个显示器连接到一个系统时,所有的显示器都会显示相同的壁纸。但是如果你想在这些显示器上显示不同的图片,那么你可以使用这个叫做 Hydrapaper 的应用程序。这个 GTK 应用程序,很好地集成到了 GNOME 桌面,并为你提供了以下功能:
|
||||
|
||||
* 预览显示器的 ID 和它们所显示的内容
|
||||
* 添加你的图片文件夹并在应用程序中浏览
|
||||
* 收藏选项可以快速选择你最喜欢的一个壁纸
|
||||
* 五种壁纸模式(缩放、黑色背景的适合/居中、模糊背景的适合/居中)。
|
||||
* 随机壁纸模式
|
||||
* 命令行选项,可以通过脚本来扩展它
|
||||
|
||||
![Hydrapaper - 多个屏幕的壁纸][22]
|
||||
|
||||
下面是如何安装这个应用程序。
|
||||
|
||||
- 适用于 Debian/Ubuntu:`sudo apt install hydrapaper`
|
||||
- 适用于 Fedora 和相关发行版:`sudo dnf install hydrapaper`
|
||||
- Arch 用户可以在 [设置 yay][23] 后通过 AUR 安装它:`yay -S hydrapaper-git`
|
||||
- 你也可以在 [设置][16] 好 Flatpak 之后,[通过 Flathub 安装][24]
|
||||
|
||||
更多信息:
|
||||
|
||||
* [主页][25]
|
||||
* [源代码][26]
|
||||
|
||||
#### Solanum - 番茄时钟客户端
|
||||
|
||||
下一个 GNOME 应用程序叫做 Solanum,它是一个基于 [番茄时钟技术][27] 的时间跟踪应用程序。该技术是将你的时间分成 25 分钟的小块,间隔有 5 分钟的休息时间,这被称为一个“<ruby>番茄<rt>Pomodoro</rt></ruby>”。4 个番茄之后,你可以休息更长时间。
|
||||
|
||||
这个应用程序可以帮助你做到这一点。Solanum 有一个非常简单的用户界面,在一个带有计时器的圈中显示“番茄”。切换“开始/停止”按钮帮助管理你的时间。这是一个非常有用的工具,特别是如果你在管理时间方面面临困难。
|
||||
|
||||
![Solanum][28]
|
||||
|
||||
下面是如何安装它的方法。
|
||||
|
||||
- 你可以在 [设置][16] 之后,[通过 Flathub 安装][29]
|
||||
|
||||
更多信息:
|
||||
|
||||
* [主页][30]
|
||||
* [源代码][31]
|
||||
|
||||
#### Cawbird - Twitter 客户端
|
||||
|
||||
[Cawbird][32] 是一个基于 GTK 的 Twitter 客户端,用于 GNOME 桌面。它是那个在 Twitter API 变化后停止使用的 [Corebird][33] 的一个复刻。这款应用非常适合你的 GNOME 桌面,并且拥有 Twitter 网站的所有功能。从资源上看,它是轻量级的。如果你是 Twitter 的忠实用户,那么你可以试试这个应用。
|
||||
|
||||
![Cawbird - 一个原生的 Twitter GNOME 应用][34]
|
||||
|
||||
以下是安装步骤。
|
||||
|
||||
- Ubuntu/Debian,请使用 openSUSE 提供的 [预编译 DEB 包][35]
|
||||
- Fedora 及相关发行版:`sudo dnf install cawbird`
|
||||
- 对于 Arch Linux,你可以通过以下方式安装它:`pacman -Syu cawbird`
|
||||
- [以 Flatpak 方式安装][36]
|
||||
- [以 Snap 方式安装][37]
|
||||
|
||||
更多信息:
|
||||
|
||||
* [主页][32]
|
||||
* [源代码][38]
|
||||
|
||||
#### News Flash - RSS 阅读器
|
||||
|
||||
News Flash 是最好的 GNOME 应用程序之一,用于阅读你喜爱的网站的 RSS 提要。这个应用程序对你的 GNOME 桌面来说是完美的,因为它提供了很多功能。它能为你的新消息、未读消息提供弹出式通知,支持深色模式等。下面是对其功能的快速总结:
|
||||
|
||||
也许最令人兴奋的功能是能够直接在应用程序本身内部阅读文章,即使该 <ruby>内容源<rt>feed</rt></ruby> 不提供完整文章。它会试图从 URL 中获取文本,并在应用程序窗口中显示(没有图像)。
|
||||
|
||||
* 集成了流行的内容源
|
||||
* 用 OPML 导入和导出内容源
|
||||
* 支持暗色模式
|
||||
* 读者模式
|
||||
* 书签、搜索、导出文章选项
|
||||
* 在设置中给你提供应用程序使用了多少磁盘空间来存储内容源的详细信息。
|
||||
|
||||
![News Flash:管理内容源的最佳 GNOME 应用程序之一][39]
|
||||
|
||||
有兴趣吗?下面是如何安装的方法。
|
||||
|
||||
- 在 [初始设置][16] 之后,[通过 Flathub 安装][40]
|
||||
- 如果你在 Arch Linux 中,你可以 [设置 Yay AUR 助手][23],然后使用下面的命令来安装:`yay -S newsflash`
|
||||
|
||||
更多信息:
|
||||
|
||||
* [主页][41]
|
||||
* [源代码][42]
|
||||
|
||||
#### Fragments - BitTorrent 客户端
|
||||
|
||||
Fragments 是一个简单的 BitTorrent 桌面客户端,构建在 GTK 上。虽然我们已经有了 Transmission 这个完美的 BitTorrent 客户端,它有独立的 GTK 和 QT 用户界面。但在 GNOME 桌面上有一个更简单的 BitTorrent 客户端也无妨,对吗?Fragments 有一个简单的界面,符合 GNOME 设计准则,并提供了 BitTorrent 客户端所需的所有功能。它也支持磁力链。
|
||||
|
||||
![Fragments:GNOME 桌面的 BitTorrent 客户端][43]
|
||||
|
||||
下面是如何安装的方法。
|
||||
|
||||
- 最好的安装方式是在 [设置][16] Flathub 软件仓库之后,[通过 Flathub 安装][44]
|
||||
|
||||
更多信息:
|
||||
|
||||
* [主页][45]
|
||||
* [源代码][46]
|
||||
|
||||
#### MetadataCleaner - 从各种文件中清理元数据
|
||||
|
||||
有没有遇到过这样的情况:你需要从文件中删除某些信息,比如由谁创建,或者通过什么软件创建。例如,如果你有一张用 GIMP 创建的图片,该文件包含一个默认的文本(除非你删除它):“由 GIMP 创建”。另外,图片可能包含位置细节、时间戳、相机信息等等。而删除这些信息需要一些特定的应用程序,并需付出额外的努力。
|
||||
|
||||
MetedataCleaner 应用程序就是做这个的。它可以帮助你从文件中删除这些信息。当你用这个应用程序打开一个文件时,它会读取并给你一个元数据的列表。你所需要做的就是点击“<ruby>清洁<rt>Clean</rt></ruby>”按钮,然后你就有了清理过的文件。对于 GNOME 来说,这样一个有用的工具。
|
||||
|
||||
![Metadata Cleaner][47]
|
||||
|
||||
这个应用程序的安装步骤如下。
|
||||
|
||||
- 最好的安装方法是在 [设置][16] Flathub 软件仓库之后,[通过 Flathub 安装][48]
|
||||
|
||||
更多信息:
|
||||
|
||||
* [主页][49]
|
||||
* [源代码][50]
|
||||
|
||||
#### Kooha - 屏幕录像机
|
||||
|
||||
如果你正在为 GNOME 桌面寻找一个快速而简单的屏幕录像机,那么不妨试试 Kooha。这个应用程序是最好的 GNOME 应用程序之一,提供轻松的记录体验。这个工具支持硬件加速、定时器、多源输入和许多高级功能。下面是功能摘要:
|
||||
|
||||
* 可选择多显示器中任一显示器或任何窗口
|
||||
* 硬件加速的编码
|
||||
* 可选择录制屏幕的区域
|
||||
* 记录麦克风和电脑的声音
|
||||
* 记录的延迟定时器
|
||||
* 支持 WebM、mp4、gif、mkv 文件类型
|
||||
|
||||
![Kooha - GNOME 最佳屏幕录制器][51]
|
||||
|
||||
下面是安装方法。
|
||||
|
||||
- 最好的安装方式是在 [设置][16] Flathub 软件仓库之后,[通过 Flathub 安装][52]
|
||||
|
||||
更多信息:
|
||||
|
||||
* [主页][53]
|
||||
* [源代码][54]
|
||||
|
||||
#### Metronome - 节拍器
|
||||
|
||||
节拍器,最初是 [一种古老的设备][55],它以每分钟节拍的恒定间隔产生一些可听的短促声音。这对于需要保持一致的动作、活动,并且不失去注意力的加速或减速的任务很有用。
|
||||
|
||||
因此,这个名为 Metronome 的 GNOME 应用程序是一个软件版的设备,可以帮助你保持你的活动和注意力。这是音乐家们专门用来练习演奏的,以固定的时间间隔来保持一致。
|
||||
|
||||
![GNOME 的节拍器][56]
|
||||
|
||||
下面是安装的方法。
|
||||
|
||||
- 最好的安装方法是在 [设置][16] Flathub 软件仓库之后,[通过 Flathub 安装][57]
|
||||
|
||||
更多信息:
|
||||
|
||||
* [主页][58]
|
||||
* [源代码][59]
|
||||
|
||||
### 总结
|
||||
|
||||
这就是 10 个最好的 GNOME 应用程序列表,可以扩展你的桌面体验。感谢 Flatpak,不仅在 GNOME,你还可以在 KDE Plasma 或 Xfce 或任何其他桌面上使用它们。我希望这些用于 GNOME 桌面的应用程序可以变得更加流行,使用率也会增加。
|
||||
|
||||
你最喜欢的 GNOME 应用程序是什么,请在下面的评论框中告诉我。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.debugpoint.com/2021/12/best-gnome-apps-part-1/
|
||||
|
||||
作者:[Arindam][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[wxy](https://github.com/wxy)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.debugpoint.com/author/admin1/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.debugpoint.com/2021/12/best-gnome-apps-part-2/
|
||||
[2]: https://www.debugpoint.com/2022/01/best-gnome-apps-part-3/
|
||||
[3]: https://www.debugpoint.com/2022/02/best-gnome-apps-part-4/
|
||||
[4]: tmp.SdvbWYqKsq#geary
|
||||
[5]: tmp.SdvbWYqKsq#notejot
|
||||
[6]: tmp.SdvbWYqKsq#hydrapaper
|
||||
[7]: tmp.SdvbWYqKsq#solanum
|
||||
[8]: tmp.SdvbWYqKsq#cawbird
|
||||
[9]: tmp.SdvbWYqKsq#news-flash
|
||||
[10]: tmp.SdvbWYqKsq#fragments
|
||||
[11]: tmp.SdvbWYqKsq#metadata-cleaner
|
||||
[12]: tmp.SdvbWYqKsq#kooha
|
||||
[13]: tmp.SdvbWYqKsq#metronome
|
||||
[14]: https://www.debugpoint.com/2019/06/best-email-client-linux-windows/
|
||||
[15]: https://www.debugpoint.com/wp-content/uploads/2021/12/Geary-Email-Client-for-GNOME.jpg
|
||||
[16]: https://flatpak.org/setup/
|
||||
[17]: https://flathub.org/repo/appstream/org.gnome.Geary.flatpakref
|
||||
[18]: https://wiki.gnome.org/Apps/Geary
|
||||
[19]: https://gitlab.gnome.org/GNOME/geary
|
||||
[20]: https://www.debugpoint.com/wp-content/uploads/2021/12/Stupidly-Simple-Note-Taking-App-Notejot.jpg
|
||||
[21]: https://github.com/lainsce/notejot
|
||||
[22]: https://www.debugpoint.com/wp-content/uploads/2021/12/Hydrapaper-Wallpaper-for-Multiple-Screens-1024x689.jpg
|
||||
[23]: https://www.debugpoint.com/2021/01/install-yay-arch/
|
||||
[24]: https://flathub.org/apps/details/org.gabmus.hydrapaper
|
||||
[25]: https://hydrapaper.gabmus.org/
|
||||
[26]: https://gitlab.gnome.org/gabmus/hydrapaper
|
||||
[27]: https://en.wikipedia.org/wiki/Pomodoro_Technique
|
||||
[28]: https://www.debugpoint.com/wp-content/uploads/2021/12/Solanum.jpg
|
||||
[29]: https://dl.flathub.org/repo/appstream/org.gnome.Solanum.flatpakref
|
||||
[30]: https://apps.gnome.org/app/org.gnome.Solanum/
|
||||
[31]: https://gitlab.gnome.org/World/Solanum
|
||||
[32]: https://ibboard.co.uk/cawbird/
|
||||
[33]: https://corebird.baedert.org/
|
||||
[34]: https://www.debugpoint.com/wp-content/uploads/2021/12/Cawbird-A-Native-GNOME-App-for-Twitter.jpg
|
||||
[35]: https://software.opensuse.org//download.html?project=home%3AIBBoard%3Acawbird&package=cawbird
|
||||
[36]: https://flathub.org/apps/details/uk.co.ibboard.cawbird
|
||||
[37]: https://snapcraft.io/cawbird
|
||||
[38]: https://github.com/IBBoard/cawbird
|
||||
[39]: https://www.debugpoint.com/wp-content/uploads/2021/12/News-Flash-One-of-the-best-GNOME-App-for-Managing-Feeds-1024x618.jpg
|
||||
[40]: https://flathub.org/apps/details/com.gitlab.newsflash
|
||||
[41]: https://apps.gnome.org/app/com.gitlab.newsflash/
|
||||
[42]: https://gitlab.com/news-flash/news_flash_gtk
|
||||
[43]: https://www.debugpoint.com/wp-content/uploads/2021/12/Fragments-Torrent-Client-for-GNOME-Desktop.jpg
|
||||
[44]: https://flathub.org/apps/details/de.haeckerfelix.Fragments
|
||||
[45]: https://apps.gnome.org/app/de.haeckerfelix.Fragments/
|
||||
[46]: https://gitlab.gnome.org/World/Fragments
|
||||
[47]: https://www.debugpoint.com/wp-content/uploads/2021/12/Metadata-Cleaner.jpg
|
||||
[48]: https://flathub.org/apps/details/fr.romainvigier.MetadataCleaner
|
||||
[49]: https://metadatacleaner.romainvigier.fr/
|
||||
[50]: https://gitlab.com/rmnvgr/metadata-cleaner/
|
||||
[51]: https://www.debugpoint.com/wp-content/uploads/2021/12/Kooha-Best-Screen-Recoder-for-GNOME.jpg
|
||||
[52]: https://flathub.org/apps/details/io.github.seadve.Kooha
|
||||
[53]: https://apps.gnome.org/app/io.github.seadve.Kooha/
|
||||
[54]: https://github.com/SeaDve/Kooha
|
||||
[55]: https://en.wikipedia.org/wiki/Metronome
|
||||
[56]: https://www.debugpoint.com/wp-content/uploads/2021/12/Metronome-for-GNOME.jpg
|
||||
[57]: https://flathub.org/apps/details/com.adrienplazas.Metronome
|
||||
[58]: https://apps.gnome.org/app/com.adrienplazas.Metronome/
|
||||
[59]: https://gitlab.gnome.org/World/metronome
|
||||
[60]: https://t.me/debugpoint
|
||||
[61]: https://twitter.com/DebugPoint
|
||||
[62]: https://www.youtube.com/c/debugpoint?sub_confirmation=1
|
||||
[63]: https://facebook.com/DebugPoint
|
||||
[64]: https://dl.flathub.org/repo/appstream/io.github.lainsce.Notejot.flatpakref
|
@ -0,0 +1,321 @@
|
||||
[#]: subject: "10 Perfect Apps to Improve Your GNOME Experience [Part 2]"
|
||||
[#]: via: "https://www.debugpoint.com/2021/12/best-gnome-apps-part-2/"
|
||||
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "wxy"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14307-1.html"
|
||||
|
||||
10 个提升 GNOME 体验的最佳应用程序(二)
|
||||
======
|
||||
|
||||
> 这是下一组 GNOME 应用程序,非常适合于你的 GNOME 桌面。它的范围包括游戏、实用工具和生产力。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202202/26/125834us3qnss5qhlwx9z6.jpg)
|
||||
|
||||
有许多原生的 GNOME 应用程序散落在各地,但用户完全不知道。它们出乎意料地好,并且完美地完成了它的工作。这些应用程序没有办法通过 GNOME 自己的应用程序商店顺利找到,因为,GNOME 应用程序网站并没有将它们全部列出。
|
||||
|
||||
也就是说,我们正在继续一个 GNOME 应用程序的发现系列,使这些应用程序变得流行。变得流行是增加知名度和社区贡献的一个好方法。显然,这些应用程序的质量也会得到提高,因为有更多的错误被报告和修复。
|
||||
|
||||
在这个《最佳 GNOME 应用程序》系列文章中,我们将重点介绍一些或已知道、或不知道的基于 GTK 的原生应用程序,它们是专门为 GNOME 增加功能设计的。
|
||||
|
||||
在这篇文章中,我们介绍了以下完美的 GNOME 应用程序:
|
||||
|
||||
* Flatseal - 管理 Flatpak 应用程序的权限
|
||||
* Junction - 选择应用程序,以便即时打开文件/链接
|
||||
* Blanket - 提高生产力
|
||||
* Mousai - 发现音乐(像 Shazam 一样)
|
||||
* Shortwave - 网络电台
|
||||
* Health - 健康参数跟踪器
|
||||
* Dialect - GNOME 的翻译应用
|
||||
* Video Trimmer - 一个超快的视频分割器
|
||||
* Console - 一个新的极简的 GNOME 终端
|
||||
* Crosswords for GNOME - 一个填字游戏
|
||||
|
||||
### Flatseal - 管理 Flatpak 应用程序的权限
|
||||
|
||||
这个 GNOME 应用程序非常适合 Flatpak 应用程序的重度用户。Flatpak 应用程序在设计上是以沙盒模式运行的。这意味着,它们默认不能访问宿主机系统组件。例如,一个 Flatpak 应用程序可能无法访问你的 Wi-Fi 或主目录。但是,如果一个应用程序为你提供了一个漂亮的 GUI 来管理已安装的 Flatpak 应用程序的所有访问权限呢?
|
||||
|
||||
Flatseal 就是这样做的。它列出了你安装的 Flatpak 应用程序,并为你提供了漂亮的用户界面,以授予或删除所有 Flatpak 应用程序的访问权限。如果你正在使用 GNOME 桌面,这个简单易用的应用程序是必备的。
|
||||
|
||||
下面是它的外观和安装步骤。
|
||||
|
||||
![Flatseal 显示应用程序及其权限的列表][14]
|
||||
|
||||
为你的 Linux 发行版 [设置 Flatpak][15]。然后点击下面的链接,启动自带的软件管理器进行安装(如“<ruby>软件<rt>Software</rt></ruby>”或“<ruby>发现<rt>Discover</rt></ruby>”)。
|
||||
|
||||
- [通过 Flathub 仓库安装 Flatseal][16]
|
||||
|
||||
更多信息:
|
||||
|
||||
* [源代码和开发][17]
|
||||
* [文档][18]
|
||||
|
||||
### Junction - 选择应用程序,以便即时打开文件/链接
|
||||
|
||||
下一个应用程序是文件的“用……打开”功能的扩展版本。通常情况下,每个文件的扩展名都与一个特定的程序绑定,以便在操作系统中打开它们。你可以在 GNOME 的设置中随时改变它。例如,.txt(文本)文件总是通过 Gedit 打开。
|
||||
|
||||
当你使用这个叫做 Junction 的应用程序,并试图打开任何链接或文件时,它会弹出一个单独的菜单,其中有应用程序的图标,以打开该链接或文件。
|
||||
|
||||
例如,如果你试图打开一个 PNG 文件,它会给你提供选项,让你用操作系统中安装的所有可用的图形应用程序打开该图像文件。
|
||||
|
||||
![Junction GNOME 应用程序显示打开图像的应用程序的选项][19]
|
||||
|
||||
有兴趣吗?下面是如何安装的。
|
||||
|
||||
为你的 Linux 发行版 [设置 Flatpak][15]。然后点击下面的链接,启动自带的软件管理器进行安装(如“<ruby>软件<rt>Software</rt></ruby>”或“<ruby>发现<rt>Discover</rt></ruby>”)。
|
||||
|
||||
- [通过 Flathub 安装 Junction][20]
|
||||
|
||||
更多信息:
|
||||
|
||||
* [主页][21]
|
||||
* [源代码][22]
|
||||
|
||||
### Blanket - 提高你的注意力和生产力
|
||||
|
||||
这是我最喜欢的 GNOME 桌面的应用程序。想听雨声吗?或者鸟儿的歌唱?波浪声?这些自然界的声音有助于集中精力,提高你的注意力。甚至那些有助于你在嘈杂的环境中工作或入睡。
|
||||
|
||||
这个应用程序 - Blanket 预装了这些声音。你只需要安装并点击播放,就可以享受平静和安宁的音乐。
|
||||
|
||||
默认情况下,它给你很多选择:
|
||||
|
||||
* 下雨
|
||||
* 暴风雨
|
||||
* 风声
|
||||
* 波浪
|
||||
* 溪流
|
||||
* 鸟鸣
|
||||
* 夏夜
|
||||
* 火车
|
||||
* 船
|
||||
* 城市
|
||||
* 咖啡馆
|
||||
* 壁炉
|
||||
* 粉红噪音和白噪声
|
||||
|
||||
哦,你也可以添加你自己的自定义音乐(mp3、wav、ogg)并播放。
|
||||
|
||||
![使用 Blanket 镇定你的心][23]
|
||||
|
||||
我相信你一定想安装这个应用程序。现在你可以这样安装。
|
||||
|
||||
为你的 Linux 发行版 [设置 Flatpak][15]。然后点击下面的按钮,启动自带的软件管理器进行安装(如“<ruby>软件<rt>Software</rt></ruby>”或“<ruby>发现<rt>Discover</rt></ruby>”)。
|
||||
|
||||
- [通过 Flathub 安装 Blanket][24]
|
||||
|
||||
更多信息:
|
||||
|
||||
* [源代码][25]
|
||||
* [主页][26]
|
||||
|
||||
### Mousai - 发现音乐(像 Shazam 一样)
|
||||
|
||||
我相信你已经听说过 [Shazam][27],这是一个用于智能手机和平板的流行的音乐识别应用程序。Mousai 是一个用于 GNOME 桌面的音乐识别应用。它可以聆听并同时识别歌曲的细节。这个应用程序使用你系统的麦克风或桌面的线路输出音频进行输入。
|
||||
|
||||
很干净整洁,对吧。下面是它的一些特点:
|
||||
|
||||
* 易于使用的用户界面 —— 非常适合 GNOME 桌面
|
||||
* 在几秒钟内识别出歌曲
|
||||
* 将识别的歌曲储存在历史信息中,以便于参考
|
||||
* 从应用程序内浏览网络上的歌曲信息
|
||||
|
||||
![Mousai][28]
|
||||
|
||||
在你点击安装之前,请记住这个应用程序的功能使用了流行的 [audd.io][29] 的 API。
|
||||
|
||||
为你的 Linux 发行版 [设置 Flatpak][15]。然后点击下面的链接,启动自带的软件管理器进行安装(如“<ruby>软件<rt>Software</rt></ruby>”或“<ruby>发现<rt>Discover</rt></ruby>”)。
|
||||
|
||||
- [通过 Flathub 安装 Mousai][30]
|
||||
|
||||
更多信息:
|
||||
|
||||
* [主页][31]
|
||||
* [源代码][32]
|
||||
|
||||
### Shortwave - 网络电台
|
||||
|
||||
如果你是一个广播听众,也是一个电台粉丝,那么下一个 GNOME 应用程序就是为你准备的。Shortwave 是一个互联网电台,与 GNOME 桌面无缝集成。它能够访问全球 25,000 个广播电台,其独特的功能有:
|
||||
|
||||
* 浏览电台
|
||||
* 搜索电台
|
||||
* 查看最多投票的电台
|
||||
* 获取其他用户正在收听的电台
|
||||
* 创建你的广播电台库
|
||||
* 能够从 GNOME 直接向网络设备(如谷歌 Chromecast)播放节目
|
||||
|
||||
![Shortwave 应用][33]
|
||||
|
||||
这款广播流媒体应用程序是当今完美的 GNOME 应用程序之一,具有这些令人印象深刻的功能。以下是安装和进入收听状态的方法。
|
||||
|
||||
为你的 Linux 发行版 [设置 Flatpak][15]。然后点击下面的链接,启动自带的软件管理器进行安装(如“<ruby>软件<rt>Software</rt></ruby>”或“<ruby>发现<rt>Discover</rt></ruby>”)。
|
||||
|
||||
- [通过 Flathub 安装 Shortwave][35]
|
||||
|
||||
更多信息:
|
||||
|
||||
* [主页][36]
|
||||
* [源代码][37]
|
||||
|
||||
### Health - 健康参数追踪器
|
||||
|
||||
想在 GNOME 桌面上直接掌握你的运动和相关活动的情况吗?那么这个应用程序可能就是你要找的。健康应用程序能够跟踪你的步数、体重、卡路里和活动,如游泳、跑步等。
|
||||
|
||||
这个应用程序给你一个漂亮的用户界面,显示你是否达到了总步数的每日目标,等等。
|
||||
|
||||
![Health 应用程序][38]
|
||||
|
||||
以下是你如何安装这个应用程序。
|
||||
|
||||
为你的 Linux 发行版 [设置 Flatpak][15]。然后点击下面的链接,启动自带的软件管理器进行安装(如“<ruby>软件<rt>Software</rt></ruby>”或“<ruby>发现<rt>Discover</rt></ruby>”)。
|
||||
|
||||
- [通过 Flathub 安装 Health][39]
|
||||
|
||||
更多信息:
|
||||
|
||||
* [主页][40]
|
||||
* [源代码][41]
|
||||
|
||||
### Dialect - GNOME 的翻译应用
|
||||
|
||||
想找一个真正适用于 GNOME 的本地翻译应用吗?那么 Dialect 就是你正在寻找的应用程序。Dialect 是一个完美的 GNOME 原生应用程序,可以轻松地将任意文本从一种语言翻译成另一种语言。这个应用程序使用谷歌翻译的非正式 API,并给你完美的翻译。它还使用 LibreTranslate API,这是一个自由开源的机器翻译 API,可以在线使用。
|
||||
|
||||
Dialect 的其他独特功能包括文本到语音、保存你的翻译历史、自动语言检测和用户界面中的剪贴板按钮,这里仅举几例。
|
||||
|
||||
![Dialect][42]
|
||||
|
||||
以下是你现在可以为你的 GNOME 桌面安装它的方法。
|
||||
|
||||
为你的 Linux 发行版 [设置 Flatpak][15]。然后点击下面的链接,启动自带的软件管理器进行安装(如“<ruby>软件<rt>Software</rt></ruby>”或“<ruby>发现<rt>Discover</rt></ruby>”)。
|
||||
|
||||
- [通过 Flathub 安装 Dialect][43]
|
||||
|
||||
更多信息:
|
||||
|
||||
* [主页][44]
|
||||
* [源代码][45]
|
||||
|
||||
### Video Trimmer - 更快地剪切你的视频
|
||||
|
||||
Video Trimmer 是一个完美的小工具,可以超快地切割你的视频。它只需要设置你的视频的开始和结束时间戳,就可以给你最终的文件。它将文件保存到你的目标目录,你也可以直接从应用程序本身打开文件位置。这个应用程序完美地集成了 GNOME UI,并为你提供了漂亮的修剪时间线和视频预览。
|
||||
|
||||
![Video Trimmer][46]
|
||||
|
||||
以下是你现在可以为你的 GNOME 桌面安装它的方法。
|
||||
|
||||
为你的 Linux 发行版 [设置 Flatpak][15]。然后点击下面的链接,启动自带的软件管理器进行安装(如“<ruby>软件<rt>Software</rt></ruby>”或“<ruby>发现<rt>Discover</rt></ruby>”)。
|
||||
|
||||
- [通过 Flathub 安装 Video Trimmer][47]。
|
||||
|
||||
更多信息:
|
||||
|
||||
* [源代码][48]
|
||||
|
||||
### Console - 一个为初学者准备的新的最小的 GNOME 终端
|
||||
|
||||
这是一个相当新的应用程序,目前正在开发中。这是一个简单的终端程序,旨在为那些技术水平不高的用户提供服务。对于高级用户,GNOME 已经有一个叫做 [GNOME 终端][49] 的终端模拟器。
|
||||
|
||||
你可能会问为什么 GNOME 需要另一个终端,对吗?好吧,Console 是为终端新手设计的,它考虑到了以下使用情况:
|
||||
|
||||
* 当一个命令完成时,发出一个漂亮的通知
|
||||
* 如果用户尝试使用 root 模式(使用 `sudo`、`su` 等),终端会变成红色
|
||||
* 当使用 `ssh` 时,终端会变成紫色。
|
||||
|
||||
这个应用程序仍在 GitLab 上开发。不幸的是,目前还没有安装程序可用。不过,你可以去编译。我试图用 meson 来编译它,但由于依赖关系而失败。
|
||||
|
||||
等我我能够编译它,我将在这里放一张截图。
|
||||
|
||||
同时,你可以在 [GitLab][50] 中关注这个项目。
|
||||
|
||||
### Crosswords for GNOME
|
||||
|
||||
我相信你如果喜欢解字谜。那么这款针对 GNOME 的最终应用就非常适合你。GNOME 填字游戏是填字游戏播放器和编辑器。这个游戏带有填字游戏集,你可以开始解题。如果你被卡住了,该应用程序将帮助你揭示你在选词方面的错误。基本的正方形黑白字谜是可用的,但是由于其风格支持,你可以享受各种形状和颜色的字谜板。
|
||||
|
||||
![GNOME 填字游戏 - 图片 1][51]
|
||||
|
||||
![GNOME 填字游戏 - 图片 2][52]
|
||||
|
||||
这个应用程序的编辑部分目前还在开发中。但是你仍然可以通过安装一个演示的 Flatpak 来玩,所有这些都可以在下面的链接中找到。
|
||||
|
||||
为你的 Linux 发行版 [设置 Flatpak][15]。然后点击下面的链接,启动自带的软件管理器进行安装(如“<ruby>软件<rt>Software</rt></ruby>”或“<ruby>发现<rt>Discover</rt></ruby>”)。
|
||||
|
||||
- [通过私有仓库安装演示版填字游戏][53]
|
||||
|
||||
在 [这里][54] 关注这个应用程序的开发。
|
||||
|
||||
### 总结
|
||||
|
||||
这就是本期的 GNOME 应用程序系列中最完美、最优秀的应用程序了。我希望你能为你的 GNOME 桌面发现一些很酷的 GTK 应用程序。确保开始为你的工作/目的使用它们。你对这篇文章中完美的 GNOME 应用程序有什么看法?请在下面的评论栏里告诉我。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.debugpoint.com/2021/12/best-gnome-apps-part-2/
|
||||
|
||||
作者:[Arindam][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[wxy](https://github.com/wxy)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.debugpoint.com/author/admin1/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.debugpoint.com/2021/12/best-gnome-apps-part-1/
|
||||
[2]: https://www.debugpoint.com/2022/01/best-gnome-apps-part-3/
|
||||
[3]: https://www.debugpoint.com/2022/02/best-gnome-apps-part-4/
|
||||
[4]: tmp.gkcrhOlzXU#flatseal
|
||||
[5]: tmp.gkcrhOlzXU#junction
|
||||
[6]: tmp.gkcrhOlzXU#blanket
|
||||
[7]: tmp.gkcrhOlzXU#mousai
|
||||
[8]: tmp.gkcrhOlzXU#shortwave
|
||||
[9]: tmp.gkcrhOlzXU#health
|
||||
[10]: tmp.gkcrhOlzXU#dialect
|
||||
[11]: tmp.gkcrhOlzXU#video-trimmer
|
||||
[12]: tmp.gkcrhOlzXU#console
|
||||
[13]: tmp.gkcrhOlzXU#crossword
|
||||
[14]: https://www.debugpoint.com/wp-content/uploads/2021/12/Flatseal-Showing-list-of-apps-and-their-permissions.jpg
|
||||
[15]: https://flatpak.org/setup/
|
||||
[16]: https://dl.flathub.org/repo/appstream/com.github.tchx84.Flatseal.flatpakref
|
||||
[17]: https://github.com/tchx84/Flatseal
|
||||
[18]: https://github.com/tchx84/Flatseal/blob/master/DOCUMENTATION.md
|
||||
[19]: https://www.debugpoint.com/wp-content/uploads/2021/12/Junction-GNOME-App-showing-options-as-app-to-open-an-image.jpg
|
||||
[20]: https://dl.flathub.org/repo/appstream/re.sonny.Junction.flatpakref
|
||||
[21]: https://apps.gnome.org/app/re.sonny.Junction/
|
||||
[22]: https://github.com/sonnyp/Junction
|
||||
[23]: https://www.debugpoint.com/wp-content/uploads/2021/12/Calm-your-mind-using-Blanket.jpg
|
||||
[24]: https://dl.flathub.org/repo/appstream/com.rafaelmardojai.Blanket.flatpakref
|
||||
[25]: https://github.com/rafaelmardojai/blanket
|
||||
[26]: https://apps.gnome.org/app/com.rafaelmardojai.Blanket/
|
||||
[27]: https://www.shazam.com/home
|
||||
[28]: https://www.debugpoint.com/wp-content/uploads/2021/12/Mousai.jpg
|
||||
[29]: http://audd.io
|
||||
[30]: https://dl.flathub.org/repo/appstream/io.github.seadve.Mousai.flatpakref
|
||||
[31]: https://apps.gnome.org/app/io.github.seadve.Mousai/
|
||||
[32]: https://github.com/SeaDve/Mousai
|
||||
[33]: https://www.debugpoint.com/wp-content/uploads/2021/12/Shortwave-App.jpg
|
||||
[34]: https://www.debugpoint.com/2020/10/10-things-to-do-fedora-33-after-install/
|
||||
[35]: https://dl.flathub.org/repo/appstream/de.haeckerfelix.Shortwave.flatpakref
|
||||
[36]: https://apps.gnome.org/app/de.haeckerfelix.Shortwave/
|
||||
[37]: https://gitlab.gnome.org/World/Shortwave
|
||||
[38]: https://www.debugpoint.com/wp-content/uploads/2021/12/Health-App.jpg
|
||||
[39]: https://dl.flathub.org/repo/appstream/dev.Cogitri.Health.flatpakref
|
||||
[40]: https://apps.gnome.org/app/dev.Cogitri.Health/
|
||||
[41]: https://gitlab.gnome.org/World/Health
|
||||
[42]: https://www.debugpoint.com/wp-content/uploads/2021/12/Dialect.jpg
|
||||
[43]: https://dl.flathub.org/repo/appstream/com.github.gi_lom.dialect.flatpakref
|
||||
[44]: https://apps.gnome.org/app/com.github.gi_lom.dialect/
|
||||
[45]: https://github.com/dialect-app/dialect/
|
||||
[46]: https://www.debugpoint.com/wp-content/uploads/2021/12/Video-Trimmer.jpg
|
||||
[47]: https://dl.flathub.org/repo/appstream/org.gnome.gitlab.YaLTeR.VideoTrimmer.flatpakref
|
||||
[48]: https://gitlab.gnome.org/YaLTeR/video-trimmer
|
||||
[49]: https://help.gnome.org/users/gnome-terminal/stable/
|
||||
[50]: https://gitlab.gnome.org/GNOME/console
|
||||
[51]: https://www.debugpoint.com/wp-content/uploads/2021/12/GNOME-Crosswords-Image-1-1024x569.jpg
|
||||
[52]: https://www.debugpoint.com/wp-content/uploads/2021/12/GNOME-Crosswords-Image-2-1024x629.jpg
|
||||
[53]: https://people.gnome.org/~jrb/org.gnome.Crosswords/crosswords.flatpak
|
||||
[54]: https://gitlab.gnome.org/jrb/crosswords
|
||||
[55]: https://t.me/debugpoint
|
||||
[56]: https://twitter.com/DebugPoint
|
||||
[57]: https://www.youtube.com/c/debugpoint?sub_confirmation=1
|
||||
[58]: https://facebook.com/DebugPoint
|
122
published/202202/20220201 3 ways I configure SSH for privacy.md
Normal file
122
published/202202/20220201 3 ways I configure SSH for privacy.md
Normal file
@ -0,0 +1,122 @@
|
||||
[#]: subject: "3 ways I configure SSH for privacy"
|
||||
[#]: via: "https://opensource.com/article/22/2/configure-ssh-privacy"
|
||||
[#]: author: "Jonathan Garrido https://opensource.com/users/jgarrido"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "wxy"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14291-1.html"
|
||||
|
||||
保护 SSH 的 3 个技巧
|
||||
======
|
||||
|
||||
> 以下是我如何优化我的 SSH 体验并保护我的服务器不被非法访问。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202202/21/113550dfgtdgtfjihqfifh.jpg)
|
||||
|
||||
SSH(安全 Shell)是一个协议,它使你能够创建一个经过验证的私人连接,并使用加密密钥保护通道,在另一台机器上启动一个远程 Shell。使用这种连接,你可以执行远程命令,启动安全文件传输,转发套接字、显示和服务,等等。
|
||||
|
||||
在 SSH 出现之前,大多数远程管理是通过 telnet 完成的,公平地说,一旦你能建立一个远程会话,你几乎可以做任何你需要的事情。这个协议的问题是,通讯是以纯明文的方式进行的,没有经过加密。使用 [流量嗅探器][2] 不需要太多努力就可以看到一个会话中的所有数据包,包括那些包含用户名和密码的数据包。
|
||||
|
||||
有了 SSH,由于使用了非对称密钥,参与通信的设备之间的会话是加密的。如今,这比以往任何时候都更有意义,因为所有的云服务器都是由分布在世界各地的人管理的。
|
||||
|
||||
### 3 个配置 SSH 的技巧
|
||||
|
||||
SSH 协议最常见的实现是 OpenSSH,它由 OpenBSD 项目开发,可用于大多数 Linux 和类 Unix 操作系统。一旦你安装了这个软件包,你就会有一个名为 `sshd_config` 的文件来控制该服务的大部分行为。其默认设置通常是非常保守的,但我倾向于做一些调整,以优化我的 SSH 体验,并保护我的服务器不被非法访问。
|
||||
|
||||
### 1、改变默认端口
|
||||
|
||||
这是一个并非所有管理员都记得的问题。任何有端口扫描器的人都可以发现一个 SSH 端口,即使你之后把它移到别的端口,所以你很难把自己从危险中移除,但这样却会有效的避免了数百个针对你的服务器扫描的不成熟脚本。这是一个可以让你省心,从你的日志中减去大量的噪音的操作。
|
||||
|
||||
在写这篇文章时,我在一个云服务提供商上设置了一个 SSH 服务器,默认端口 TCP 22,每分钟平均被攻击次数为 24 次。在将端口改为一个更高的数字,即 TCP 45678 后,平均每天有两个连接并用各种用户名或密码进行猜测。
|
||||
|
||||
要改变 SSH 的默认端口,在你喜欢的文本编辑器中打开 `/etc/ssh/sshd_config`,将 `Port` 的值从 22 改为大于 1024 的某个数字。这一行可能被注释了,因为 22 是默认的(所以不需要在配置中明确声明),所以在保存之前取消注释。
|
||||
|
||||
```
|
||||
Port 22122
|
||||
#AddressFamily any
|
||||
#ListenAddress 0.0.0.0
|
||||
#ListenAddress ::
|
||||
|
||||
```
|
||||
|
||||
一旦你改变了端口并保存了文件,重新启动 SSH 服务器:
|
||||
|
||||
```
|
||||
$ sudo systemctl restart sshd
|
||||
```
|
||||
|
||||
### 2、不要使用密码
|
||||
|
||||
现在有一个普遍的潮流是停止使用密码作为认证手段,双因素认证等方法越来越受欢迎。OpenSSH 可以使用非对称密钥进行认证,因此不需要记住复杂的密码,更不需要每隔几个月轮换一次密码,也不需要担心有人在你建立远程会话时进行“肩后偷窥”。使用 SSH 密钥可以让你快速、安全地登录到你的远程设备上。这往往意味着花费在错误的用户名和密码上的时间更少。登录令人愉快的简单。当没有密钥时,就没有入口,甚至没有提示符。
|
||||
|
||||
要使用这个功能,你必须同时配置客户机(在你面前的计算机)和服务器(远程机器)。
|
||||
|
||||
在客户端机器上,你必须生成一个 SSH 密钥对。这包括一个公钥和一个私钥。正如它们的名字所暗示的,一个公开的密钥是供你分发给你想登录的服务器的,另一个是私人的密钥,必须不与任何人分享。使用 `ssh-keygen` 命令可以创建一个新的密钥对,并使用 `-t` 选项来指定一个好的、最新的密码学库,如 `ed25519`:
|
||||
|
||||
```
|
||||
$ ssh-keygen -t ed25519
|
||||
Generating public/private ed25519 key pair.
|
||||
Enter file in which to save the key (~/.ssh/id_ed25519):
|
||||
```
|
||||
|
||||
在密钥创建过程中,你会被提示为文件命名。你可以按回车键来接受默认值。如果你将来创建了更多的密钥,你可以给每个密钥起一个自定义的名字,但有多个密钥意味着你要为每次交互指定使用哪个密钥,所以现在只要接受默认即可。
|
||||
|
||||
你还可以给你的密钥一个口令。这可以确保即使别人设法获得你的私钥(这本身就不应该发生),没有你的口令,他们也无法将其投入使用。这对某些密钥来说是一种有用的保护措施,而对其他密钥来说则不合适(特别是那些用于脚本的密钥)。按回车键让你的密钥没有口令,或者你选择创建一个口令。
|
||||
|
||||
要把你的密钥复制到服务器上,使用 `ssh-copy-id` 命令。例如,如果我拥有一台名为 `example.com` 的服务器,那么我可以用这个命令把我的公钥复制到它上面:
|
||||
|
||||
```
|
||||
$ ssh-copy-id jgarrido@example.com
|
||||
```
|
||||
|
||||
这将在服务器的 `.ssh` 目录下创建或修改 `authorized_keys` 文件,其中包含你的公钥。
|
||||
|
||||
一旦确认 `ssh-copy-id` 命令完成了它所做的事情,尝试从你的电脑上登录,以验证你可以在没有密码的情况下登录(或者如果你选择使用你的密钥的口令,就输入密钥口令)。
|
||||
|
||||
在没有使用你的服务器帐户的密码登录到你的服务器上后,编辑服务器的 `sshd_config` 并将 `PasswordAuthentication` 设置为 `no`。
|
||||
|
||||
```
|
||||
PasswordAuthentication no
|
||||
```
|
||||
|
||||
重新启动 SSH 服务以加载新的配置:
|
||||
|
||||
```
|
||||
$ sudo systemctl restart sshd
|
||||
```
|
||||
|
||||
### 3、决定谁可以登录
|
||||
|
||||
大多数发行版不允许 root 用户通过 SSH 登录,这确保只有非特权账户是活跃的,根据需要使用 `sudo` 命令来提升权限。这就防止了一个明显的、令人痛苦的目标(root)受到简单而常见的脚本攻击。
|
||||
|
||||
同样,OpenSSH 的一个简单而强大的功能是能够决定哪些用户可以登录到一台机器。要设置哪些用户被授予 SSH 访问权,在你最喜欢的文本编辑器中打开 `sshd_config` 文件,并添加这样一行:
|
||||
|
||||
```
|
||||
AllowUsers jgarrido jane tux
|
||||
```
|
||||
|
||||
重新启动 SSH 服务以加载新的配置选项。
|
||||
|
||||
这只允许三个用户(`jgarrido`、`jane` 和 `tux`)登录或在远程机器上执行任何操作。
|
||||
|
||||
### 总结
|
||||
|
||||
你可以使用 OpenSSH 来实现一个强大而稳健的 SSH 服务器。这些只是加固你的系统的三个有用的选项。尽管如此,在 `sshd_config` 文件中仍有大量的功能和选项可以打开或关闭,而且有许多很棒的应用程序,如 [Fail2ban][3],你可以用来进一步保护你的 SSH 服务。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/2/configure-ssh-privacy
|
||||
|
||||
作者:[Jonathan Garrido][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[wxy](https://github.com/wxy)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/jgarrido
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/privacy_keyboard_security.jpg?itok=vZ9jFdK_ (A keyboard with privacy written on it.)
|
||||
[2]: https://www.redhat.com/sysadmin/troubleshoot-network-dhcp-configuration
|
||||
[3]: https://opensource.com/life/15/7/pipe-dreams
|
217
published/202202/20220210 Learn Perl in 2022.md
Normal file
217
published/202202/20220210 Learn Perl in 2022.md
Normal file
@ -0,0 +1,217 @@
|
||||
[#]: subject: "Learn Perl in 2022"
|
||||
[#]: via: "https://opensource.com/article/22/2/perl-cheat-sheet"
|
||||
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "wxy"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14296-1.html"
|
||||
|
||||
Perl 语言基础入门
|
||||
======
|
||||
|
||||
> 下载这份编程速查表,开始学习 Perl 的力量。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202202/22/171233dlrpnjj09jz0tz0n.jpg)
|
||||
|
||||
Perl 发布于 1988 年初,是一种后现代的编程语言,它通常被认为是一种脚本语言,但它也能进行面向对象的编程。它是一种成熟的语言,拥有 [数以万计的库][2]、GUI 框架,它有一种叫做 Raku 的衍生语言(即 Perl 6),以及一个活跃而热情的社区。它的开发者以其灵活性为荣。根据它的创造者 Larry Wall 的说法,Perl 并不对它的用户强加任何特定的编程风格,而且有不止一种方法来完成大多数事情。
|
||||
|
||||
Perl 非常健壮,它曾经被广泛使用,这使它成为新的程序员可以尝试的伟大语言。
|
||||
|
||||
- [下载 Perl 速查表][3]
|
||||
|
||||
### Perl 基础知识
|
||||
|
||||
在 Linux 和 macOS 上,你已经安装了 Perl。在 Windows 上,请从 [Perl 网站][4] 下载并安装它。
|
||||
|
||||
#### Perl 表达式
|
||||
|
||||
Perl 源代码的基本单位是 _表达式_,它是任何能返回一个 _值_ 的东西。
|
||||
|
||||
例如,`1` 是一个表达式,它返回 `1` 的值。表达式 `2` 返回 `2` 的值,而 `a` 返回字母 `a`。
|
||||
|
||||
表达式可以更复杂。表达式 `$a + $b` 包含变量(数据的占位符)和加号(`+`),它是一个数学运算符。
|
||||
|
||||
#### Perl 语句
|
||||
|
||||
Perl 语句是由表达式组成的。每个语句都以分号(`;`)结束。
|
||||
|
||||
比如说:
|
||||
|
||||
```
|
||||
$c = $a + $b;
|
||||
```
|
||||
|
||||
要尝试运行你自己的 Perl 语句,请打开终端并输入:
|
||||
|
||||
```
|
||||
$ perl -e 'print ("Hello Perl\n");'
|
||||
```
|
||||
|
||||
#### Perl 语句块
|
||||
|
||||
Perl 语句块可以用大括号(`{ }`)组合起来。块是一种有用的组织工具,但它们也为那些你可能只需要在程序的一小部分使用的数据提供了 _范围_。Python 用空白定义范围,LISP 用小括号,而 C 和 Java 用大括号。
|
||||
|
||||
#### 变量
|
||||
|
||||
变量是数据的占位符。人类每天都在使用变量而没有意识到它。例如,“它”这个词可以指代任何名词,所以我们把它作为一个方便的占位符。“找到我的手机并把它拿给我”实际上是指“找到我的手机并把我的手机拿给我。”
|
||||
|
||||
对于计算机来说,变量不是一种便利,而是一种必需品。变量是计算机识别和跟踪数据的方式。
|
||||
|
||||
在 Perl 中,你通过声明一个变量名称和它的内容来创建变量。
|
||||
|
||||
在 Perl 中,变量名称前面总是有一个美元符号(`$`)。
|
||||
|
||||
这些简单的语句创建了一个包含 `"Hello"` 和 `"Perl"` 字符串的变量 `$var`,然后将该变量的内容打印到终端:
|
||||
|
||||
```
|
||||
$ perl -e '$var = "hello perl"; print ("$var\n");'
|
||||
```
|
||||
|
||||
#### 流程控制
|
||||
|
||||
大多数程序需要做出决定,这些选择由条件语句和循环来定义和控制。`if` 语句是最直观的一种。Perl 可以测试一个特定的条件,然后 Perl 根据这个条件决定程序如何进行。其语法类似于 C 或 Java:
|
||||
|
||||
```
|
||||
my $var = 1;
|
||||
|
||||
if ($var == 1) {
|
||||
print("Hello Perl\n");
|
||||
}
|
||||
elsif ($var == 0){
|
||||
print("1 not found");
|
||||
}
|
||||
else {
|
||||
print("Good-bye");
|
||||
}
|
||||
```
|
||||
|
||||
Perl 也有一个简短的 `if` 语句的形式:
|
||||
|
||||
```
|
||||
$var = 1;
|
||||
|
||||
print("Hello Perl\n") if ($var == 1);
|
||||
```
|
||||
|
||||
#### 函数和子程序
|
||||
|
||||
尽可能多地重复使用代码是一种有益的编程习惯。这种做法可以减少错误(或将错误合并到一个代码块中,因此你只需修复一次),使你的程序更容易维护,简化你的程序逻辑,并使其他开发者更容易理解它。
|
||||
|
||||
在 Perl 中,你可以创建一个 _子程序_,它接受输入(存储在一个特殊的数组变量 `@_` 中)并可能返回一个输出。你可以使用关键字 `sub` 来创建一个子程序,后面跟一个你选择的子程序名称,然后是代码块:
|
||||
|
||||
```
|
||||
#!/usr/bin/env perl
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
sub sum {
|
||||
my $total = 0;
|
||||
|
||||
for my $i(@_){
|
||||
$total += $i;
|
||||
}
|
||||
|
||||
return($total);
|
||||
}
|
||||
|
||||
print &sum(1,2), "\n";
|
||||
```
|
||||
|
||||
当然,Perl 有许多子程序,你不必自己去创建。有些是内置于 Perl 中的,而社区库则提供了其他的。
|
||||
|
||||
### 用 Perl 编写脚本
|
||||
|
||||
Perl 可以被编译,也可以作为一种解释型的脚本语言使用。后者是刚入门时最简单的选择,特别是如果你已经熟悉了 Python 或 [shell 脚本][7]。
|
||||
|
||||
这里有一个用 Perl 编写的简单的掷骰子脚本。把它读一遍,看看你是否能跟上它。
|
||||
|
||||
```
|
||||
#!/usr/bin/env perl
|
||||
|
||||
use warnings;
|
||||
use strict;
|
||||
use utf8;
|
||||
binmode STDOUT, ":encoding(UTF-8)";
|
||||
binmode STDERR, ":encoding(UTF-8)";
|
||||
|
||||
my $sides = shift or
|
||||
die "\nYou must provide a number of sides for the dice.\n";
|
||||
|
||||
sub roller {
|
||||
my ($s) = @_;
|
||||
|
||||
my $roll = int(rand($s));
|
||||
print $roll+1, "\n";
|
||||
}
|
||||
|
||||
roller($sides);
|
||||
```
|
||||
|
||||
第一行告诉你的 [POSIX][13] 终端要使用什么可执行文件来运行该脚本。
|
||||
|
||||
接下来的五行是模板式的包含内容和设置。`use warnings` 的设置告诉 Perl 检查错误,并在终端对它发现的问题发出警告。`use strict` 设置告诉 Perl 在发现错误时不要运行脚本。
|
||||
|
||||
这两个设置都可以帮助你在代码中的错误导致问题之前发现它们,所以通常最好在你的脚本中激活它们。
|
||||
|
||||
脚本的主要部分开始于对脚本从终端启动时提供给它的 [参数][14] 进行分析。在这种情况下,预期的参数是一个虚拟骰子的所需的面的数量。Perl 将其视为一个堆栈,并使用 `shift` 函数将其分配给变量 `$sides`。当没有提供参数时,`die` 函数会被触发。
|
||||
|
||||
用 `sub` 关键字创建的 `roller` 子程序(或函数),使用 Perl 的 `rand` 函数生成一个伪随机数,最大不超过参数的数字。这意味着在这个程序中,一个 6 面的骰子不可能掷出 6,但它可以掷出 0。这对计算机和程序员来说是没有问题的,但对大多数用户来说,这是令人困惑的,所以它可以被视为一个 bug。为了在这个 bug 成为问题之前解决它,下一行在随机数上加 1,并将结果作为掷骰子的结果打印出来。
|
||||
|
||||
当引用传递给子程序的参数时,你引用的是特殊变量 `@_`,它是一个数组,包含了函数调用时括号内的所有内容。然而,当从数组中提取一个值时,数据被转换成一个标量(例子中的 `$s` 变量)。
|
||||
|
||||
子程序在被调用之前不会运行,所以脚本的最后一行调用了自定义的 `roller` 函数,将命令的参数作为函数的参数。
|
||||
|
||||
将该文件保存为 `dice.pl`,并标记为可执行:
|
||||
|
||||
```
|
||||
$ chmod +x dice.pl
|
||||
```
|
||||
|
||||
最后,尝试运行它,为它提供一个最大的数字,从中选择其随机数:
|
||||
|
||||
```
|
||||
$ ./dice.pl 20
|
||||
1
|
||||
$ ./dice.lisp 20
|
||||
7
|
||||
$ ./dice.lisp 20
|
||||
20
|
||||
```
|
||||
|
||||
没问题!
|
||||
|
||||
### Perl 速查表
|
||||
|
||||
Perl 是一种有趣而强大的语言。尽管自从 Perl 成为默认的脚本语言后,Python、Ruby 和 Go 等新兴语言引起了许多人的注意,但 Perl 的功能并不弱。事实上,它比以往任何时候都要好,而且前途光明。
|
||||
|
||||
下次你想找一种更灵活的语言,并有简单的交付方式时,不妨试试 Perl,并[下载这个速查表][3]!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/2/perl-cheat-sheet
|
||||
|
||||
作者:[Seth Kenlon][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[wxy](https://github.com/wxy)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/seth
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/OSDC_women_computing_2.png?itok=JPlR5aCA (Woman sitting in front of her computer)
|
||||
[2]: http://cpan.org/
|
||||
[3]: https://opensource.com/downloads/perl-cheat-sheet
|
||||
[4]: https://www.perl.org/get.html
|
||||
[5]: http://perldoc.perl.org/functions/print.html
|
||||
[6]: http://perldoc.perl.org/functions/return.html
|
||||
[7]: https://opensource.com/article/20/4/bash-programming-guide
|
||||
[8]: http://perldoc.perl.org/functions/binmode.html
|
||||
[9]: http://perldoc.perl.org/functions/shift.html
|
||||
[10]: http://perldoc.perl.org/functions/die.html
|
||||
[11]: http://perldoc.perl.org/functions/int.html
|
||||
[12]: http://perldoc.perl.org/functions/rand.html
|
||||
[13]: https://opensource.com/article/19/7/what-posix-richard-stallman-explains
|
||||
[14]: https://opensource.com/article/21/8/linux-terminal
|
@ -3,9 +3,9 @@
|
||||
[#]: author: "Ankush Das https://itsfoss.com/author/ankush/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14288-1.html"
|
||||
|
||||
在 Linux 中解决 “Unacceptable TLS certificate” 的问题
|
||||
======
|
||||
@ -20,7 +20,7 @@
|
||||
|
||||
![][1]
|
||||
|
||||
在我的例子中,我是在通过终端添加 Flathub 仓库时注意到这个问题的,这个步骤可以让你在[设置 Flatpak][2] 时访问大量的 Flatpaks 的集合。
|
||||
在我的例子中,我是在通过终端添加 Flathub 仓库时注意到这个问题的,这个步骤可以让你在 [设置 Flatpak][2] 时访问大量的 Flatpak 集合。
|
||||
|
||||
然而,在安装 Flatpak 应用或通过终端使用来自第三方仓库的 Flatpak 参考文件时,你也可能会遇到这个错误。
|
||||
|
||||
@ -30,23 +30,19 @@
|
||||
|
||||
嗯,从技术上讲,这是两件事中的一个:
|
||||
|
||||
* 你的系统不接受该证书(并告诉它是无效的)。
|
||||
* 你的系统不接受该证书(并说它是无效的)。
|
||||
* 该证书与用户连接的域不匹配。
|
||||
|
||||
|
||||
|
||||
如果是第二种情况,你将不得不联系网站的管理员,从他们那里解决这个问题。
|
||||
如果是第二种情况,你得联系网站的管理员,从他们那里解决这个问题。
|
||||
|
||||
但是,如果是第一种情况,你有几种方法来处理它。
|
||||
|
||||
### 1\. 在使用 Flatpak 或添加 GNOME 在线账户时修复 “Unacceptable TLS certificate”
|
||||
### 1、在使用 Flatpak 或添加 GNOME 在线账户时修复 “Unacceptable TLS certificate”
|
||||
|
||||
如果你试图添加 Flathub 远程或一个新的 Flatpak 应用,并在终端中注意到这个错误,你可以简单地输入:
|
||||
|
||||
```
|
||||
|
||||
sudo apt install --reinstall ca-certificates
|
||||
|
||||
sudo apt install --reinstall ca-certificates
|
||||
```
|
||||
|
||||
这应该会重新安装受信任的 CA 证书,以防止列表中出现某种问题。
|
||||
@ -57,26 +53,24 @@
|
||||
|
||||
所以,我认为任何与 Flatpak 有关的 TLS 证书问题都可以用这个方法解决。
|
||||
|
||||
### 2\. 在使用工作 VPN 时修复 “Unacceptable TLS certificate”
|
||||
### 2、在使用工作 VPN 时修复 “Unacceptable TLS certificate”
|
||||
|
||||
如果你使用你的组织的 VPN 来访问与工作有关的材料,你可能要把证书添加到你的 Linux 发行版中的可信 CA 列表中。
|
||||
|
||||
请注意,你需要 VPN 服务或你组织的管理员分享根证书的 .CRT 版本,才能开始使用。
|
||||
|
||||
接下来,你将需要进入 **/usr/local/share/ca-certificates** 目录。
|
||||
接下来,你需要进入 `/usr/local/share/ca-certificates` 目录。
|
||||
|
||||
你可以下面创建一个目录,并使用任何名称来标识你组织的证书。然后,将 .CRT 文件添加到该目录。
|
||||
|
||||
例如,它是 /usr/local/share/ca-certificates/organization/xyz.crt
|
||||
例如,它是 `/usr/local/share/ca-certificates/organization/xyz.crt`。
|
||||
|
||||
请注意,你需要有 root 权限来添加证书或在 **ca-certificates** 目录下创建目录。
|
||||
请注意,你需要有 root 权限来添加证书或在 `ca-certificates` 目录下创建目录。
|
||||
|
||||
当你添加了必要的证书,你所要做的就是输入以下命令更新证书支持列表:
|
||||
|
||||
```
|
||||
|
||||
sudo update-ca-certificates
|
||||
|
||||
sudo update-ca-certificates
|
||||
```
|
||||
|
||||
而且,每当你试图连接到你公司的 VPN 时,你的系统应将该证书视为有效。
|
||||
@ -96,7 +90,7 @@ via: https://itsfoss.com/unacceptable-tls-certificate-error-linux/
|
||||
作者:[Ankush Das][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
@ -0,0 +1,171 @@
|
||||
[#]: subject: "8 Reasons Why I Keep Coming Back to Firefox"
|
||||
[#]: via: "https://news.itsfoss.com/why-mozilla-firefox/"
|
||||
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "wxy"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14308-1.html"
|
||||
|
||||
为什么我又回到火狐浏览器
|
||||
======
|
||||
|
||||
> 火狐可以说是最好的开源网页浏览器。但是,是什么让它这么好?它对每个人来说都是一个可行的选择吗?让我来分享我的见解。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202202/26/193517szbff3zjlg305jbp.jpg)
|
||||
|
||||
火狐是一个神奇的开源网页浏览器。它预装在大多数 Linux 发行版中,无需多想,可以认为它是 Linux 用户和隐私爱好者的一个流行选择。
|
||||
|
||||
然而,没有什么是完美的。
|
||||
|
||||
无论是火狐、Chrome、Brave,还是任何一个 [可用于 Linux 的最佳浏览器][1],每个选择都有权衡。
|
||||
|
||||
我使用火狐浏览器已经很多年了,但最近我因为标签管理功能转而使用了 [Vivaldi][2],然后也尝试了一下 Brave。
|
||||
|
||||
但是,在这段时间里,我发现自己一再回到火狐浏览器,并一直想回来,虽然我对另一个网页浏览器也很满意(就当是一种回忆吧)。
|
||||
|
||||
那么,为什么我总是回到火狐浏览器?为什么我认为火狐是适合每个人的理想网页浏览器?
|
||||
|
||||
在这里,让我强调一些要点:
|
||||
|
||||
### 1、以隐私为重点的解决方案
|
||||
|
||||
![][3]
|
||||
|
||||
如今,每个网页浏览器(当然,除了谷歌浏览器)都旨在提供面向隐私的功能。
|
||||
|
||||
使用 Brave,甚至使用 Vivaldi,你有各种各样的选择。
|
||||
|
||||
请注意,这不是一个功能比较,而是基于我喜欢、注意到的东西。
|
||||
|
||||
Brave 可以让你自定义跟踪保护,但它不提供预设配置。你得自己调整拦截保护措施以获得你想要的体验。但是,火狐浏览器可以让你轻松地选择“标准”或“严格”保护模式,而不需要定制个人设置。
|
||||
|
||||
说到 Vivaldi,它提供了快速切换跟踪保护类型的能力,但它没有火狐那么好。此外,你没有诸如跨站 Cookie 阻止、以及针对加密矿工、指纹探针的保护。
|
||||
|
||||
除了这些细微的差别,火狐还不断为其隐私保护产品增加新的功能。
|
||||
|
||||
例如,HTTPS-Only 模式让你无需任何扩展/插件,就可以确保你连接到一个页面的 HTTPS 版本。
|
||||
|
||||
### 2、简化的用户界面
|
||||
|
||||
![][4]
|
||||
|
||||
我知道我抱怨过很多次火狐不断改造其用户界面。
|
||||
|
||||
没错,这不是很令人愉快。
|
||||
|
||||
但是,每当我习惯了它,我发现它是一个简单而有效的用户界面。我更喜欢启用它的深色主题。
|
||||
|
||||
最近的更新使它更容易访问选项、附加组件、主题等。
|
||||
|
||||
就个人而言,感觉它比其他浏览器更好。
|
||||
|
||||
希望他们不要继续他们的传统,每次重大升级都破坏用户体验。
|
||||
|
||||
### 3、开源
|
||||
|
||||
火狐是一个开源的网页浏览器。你已经知道了,但这正是它比 Chrome 等专有选项更出色的原因。
|
||||
|
||||
火狐浏览器是我几年前离开谷歌浏览器后尝试的第一个开源网页浏览器。
|
||||
|
||||
### 4、火狐多账户容器
|
||||
|
||||
![][5]
|
||||
|
||||
[火狐多账户容器][6] 是火狐的主要亮点之一。
|
||||
|
||||
如果你想在不损害隐私的情况下充分提升你的浏览体验,它是 [最佳火狐功能][7] 之一。
|
||||
|
||||
你需要安装 [火狐多账户插件][8] 才能开始使用它。
|
||||
|
||||
该功能可以让你打开相互隔离的几个浏览标签。例如,你可以使用该功能保持登录到同一服务的两个不同账户。你可以将它们分成个人、工作、银行等等几个分类。
|
||||
|
||||
你可以选择创建一个新的容器或将你当前的标签作为一个容器打开。也可以自动设置网站在新的容器中打开。
|
||||
|
||||
为了更上一层楼,火狐最近增加了为容器启用 Mozilla VPN 的功能。这样,你就可以单独保障你的浏览过程,而不需要为其余的非容器标签启用 VPN。
|
||||
|
||||
虽然这可能不适合每个人,但这是一个有用的功能。
|
||||
|
||||
### 5、集成的服务
|
||||
|
||||
![][9]
|
||||
|
||||
拥有有助于提高用户体验的内置功能和服务总是很方便。
|
||||
|
||||
使用火狐浏览器,你可以快速访问各种有用的工具。
|
||||
|
||||
这些工具包括:
|
||||
|
||||
* 地址栏中的“保存到 Pocket”按钮,可以快速添加一个网页/链接,以便以后阅读。
|
||||
* Mozilla 的 [VPN 服务][10]。
|
||||
* [Firefox Relay][11] 以保护你的原始电子邮件地址。
|
||||
* [Firefox Monitor][12] 以通知你数据泄露的情况。
|
||||
* 如果你使用的话,还有密码管理器。
|
||||
|
||||
### 6、积极开发
|
||||
|
||||
随着每一次火狐浏览器的发布,你会发现一些有价值的升级和改进。
|
||||
|
||||
当然,你对每个主要的网页浏览器都可以抱有同样的期望。但是,如果你使用的是一个不太知名的浏览器的功能,你可能想留意一下更新/开发的频率。
|
||||
|
||||
为了获得安全的体验,尽快进行安全修复、错误修复和其他改进是很重要的。
|
||||
|
||||
### 7、运作良好!
|
||||
|
||||
![][13]
|
||||
|
||||
就我而言,我更喜欢方便,而不是最新和最大的。
|
||||
|
||||
尽管火狐浏览器设法提供一些行业首创的功能,它仍然是一个方便的选择。
|
||||
|
||||
拥有一个同步你所有浏览数据和集成的服务的火狐账户是很有好处的。你可以轻松地在任何其他设备上登录该账户,无缝地继续你的工作。
|
||||
|
||||
使用 Brave,你确实也有同步功能,但它的工作方式不一样。它要求你必须有主设备在场,才能成功地将数据同步到另一个设备上(你要扫描二维码)。另外,你也可以选择生成同步代码,并将其随身携带,以便与新设备同步。但是,我觉得基于账户的同步更方便。
|
||||
|
||||
虽然 Vivaldi 提供了账户同步功能,但它在我的多显示器环境中并不工作,按钮变得没有反应,而且在 [Vivaldi 5.1 版][14] 之后,我也没能成功同步。
|
||||
|
||||
所以,火狐成为一个轻松便捷的选择。
|
||||
|
||||
### 8、打破浏览器垄断
|
||||
|
||||
去年,我们报道了 [火狐浏览器失去了近 5000 万用户][15],这让那些一直喜欢不基于 Chromium 的可靠产品的用户非常担心。
|
||||
|
||||
从技术上讲,我们确实有火狐的复刻和其他一些 [开源浏览器][16]。但是,我们需要火狐保持其地位,以便有一个可行的 Chromium 替代品。
|
||||
|
||||
### 总结
|
||||
|
||||
我应该提到,我坚持使用火狐是因为它适合我的使用情况和工作流程。
|
||||
|
||||
你不需要相信我的话。但是,至少,如果你从来没有考虑过这些使用火狐的好处,你可能该试一试!
|
||||
|
||||
你对火狐有什么看法?可以告诉我们你最喜欢的浏览器吗?让我们在下面的评论中讨论。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://news.itsfoss.com/why-mozilla-firefox/
|
||||
|
||||
作者:[Ankush Das][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[wxy](https://github.com/wxy)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://news.itsfoss.com/author/ankush/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://itsfoss.com/best-browsers-ubuntu-linux/
|
||||
[2]: https://itsfoss.com/install-vivaldi-ubuntu-linux/
|
||||
[3]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/firefox-protection-setting.jpg?resize=1568%2C1334&ssl=1
|
||||
[4]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/mozilla-firefox-screenshot.png?w=1200&ssl=1
|
||||
[5]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/firefox-containers-new.png?w=1030&ssl=1
|
||||
[6]: https://itsfoss.com/firefox-containers/
|
||||
[7]: https://itsfoss.com/firefox-useful-features/
|
||||
[8]: https://addons.mozilla.org/en-US/firefox/addon/multi-account-containers/
|
||||
[9]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/firefox-relay-alias.png?resize=1568%2C1523&ssl=1
|
||||
[10]: https://www.mozilla.org/en-US/products/vpn/
|
||||
[11]: https://relay.firefox.com
|
||||
[12]: https://monitor.firefox.com/
|
||||
[13]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/firefox-just-works-illustration.png?w=1000&ssl=1
|
||||
[14]: https://news.itsfoss.com/vivaldi-5-1-release/
|
||||
[15]: https://news.itsfoss.com/firefox-decline/
|
||||
[16]: https://itsfoss.com/open-source-browsers-linux/
|
@ -0,0 +1,211 @@
|
||||
[#]: subject: "10 Open Source Lightweight Web Browsers for Linux"
|
||||
[#]: via: "https://itsfoss.com/lightweight-web-browsers-linux/"
|
||||
[#]: author: "Marco Carmona https://itsfoss.com/author/marco/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "wxy"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14293-1.html"
|
||||
|
||||
10 个适用于 Linux 的开源轻量级网页浏览器
|
||||
======
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202202/21/171334t8u7nan785bt04e2.jpg)
|
||||
|
||||
[有很多适用于 Linux 的网页浏览器][1],其中很多都是基于 [Chromium][2],但我们也有一个 [不基于 Chromium 的浏览器][3] 的列表。
|
||||
|
||||
最近,一位读者要求推荐一款轻量级网页浏览器,因此我专门做了一些快速实验。以下是我的发现。
|
||||
|
||||
### 适用于 Linux 的轻量级网页浏览器
|
||||
|
||||
我没有进行任何基准测试,因为可能适用于一个系统的东西可能不适用于其他系统。这篇文章是基于我的经验和观点。
|
||||
|
||||
还有一点需要注意的是,一些轻量级网页浏览器的扩展功能可能有限。如果你依赖账户同步等功能并使用大量的浏览器扩展,这些浏览器可能无法满足你的需要。但是,你仍然可以尝试使用其中一些作为你的辅助浏览器。
|
||||
|
||||
还有一件事!这不是一个排名表。排名第二的浏览器不应该被认为比排名第五的更好。
|
||||
|
||||
> 注意:
|
||||
>
|
||||
> 浏览器是通往很多东西的通道。你不应该使用一个不积极开发或仅由一个开发商维护的晦涩的网页浏览器,尤其用于银行和购物。在这种情况下,坚持使用主流浏览器,如 Firefox、Brave、Vivaldi、Chrome/Chromium 更好。
|
||||
|
||||
#### 1、Viper(蝰蛇)
|
||||
|
||||
![Viper][4]
|
||||
|
||||
该浏览器专注于隐私、极简主义和定制,已成为一个强大的轻量级浏览器,在这里你可以进行你想要的一切搜索。在我看来,它是一个必不可少的浏览器,具有标签休眠支持、安全自动填写管理、全屏支持等基本功能。
|
||||
|
||||
这不是一个普通的浏览器,但如果你是一个极简主义的粉丝,也许这个浏览器适合你。
|
||||
|
||||
- 下载:[Viper][5]
|
||||
|
||||
#### 2、Nyxt
|
||||
|
||||
![Nyxt][8]
|
||||
|
||||
“黑客的强力浏览器” 是 [Nyxt][9] 的官方网页对它自己的描述;说实话,它很不错。
|
||||
|
||||
尽管它不是唯一面向键盘的网页浏览器;它的独特之处在于,你可以在这个浏览器中覆盖和重新配置每一个类、方法和函数。它也有一个内置的命令行工具。难怪它被称为“黑客的强力浏览器”。
|
||||
|
||||
Nyxt 使用的是一个简单的计算机编程环境,它接受单一的用户输入,执行它们,并将结果返回给用户;就像最著名的 [REPL(读取-评估-打印循环)][10] 一样。
|
||||
|
||||
- 下载:[Nyxt][39]
|
||||
|
||||
#### 3、Lynx(猞猁)
|
||||
|
||||
![Lynx][11]
|
||||
|
||||
我肯定会说这是为 [命令行][12] 爱好者准备的,因为这个神奇的浏览器可以让你 [从你的 Linux 终端上网][13]。没错!你可以在你的终端中启动它来轻松访问互联网。
|
||||
|
||||
当然,它消耗的资源更少,但你不应该指望获得从 Firefox 或 Brave 等常规浏览器中相同的浏览体验。
|
||||
|
||||
你知道吗?这是一个最古老的网络浏览器,它始于 1992 年,至今仍在维护。
|
||||
|
||||
- [Lynx][14]
|
||||
|
||||
#### 4、SeaMonkey(海猴)
|
||||
|
||||
![SeaMonkey][15]
|
||||
|
||||
这个是另一个多合一的导航器,但 SeaMonkey 包括什么呢?SeaMonkey 增加了电子邮件客户端、网站内容源阅读器、HTML 编辑器、IRC 聊天和网络开发工具等特性,以及其他一些特性。
|
||||
|
||||
我想说 [SeaMonkey][16] 是 Firefox 的一个不可思议的复刻,就像 [Librewolf][17]。正如其网页所说,它使用了许多与 Mozilla Firefox 相同的源代码。
|
||||
|
||||
- 下载:[SeaMonkey][18]
|
||||
|
||||
#### 5、Waterfox(水狐)
|
||||
|
||||
![Waterfox][19]
|
||||
|
||||
说实话,当我在个人电脑上试用 Waterfox 浏览器时,我对它的性能和速度感到震惊。我是一个信奉极简主义的人,我想这就是为什么我这么喜欢它。这个浏览器的一个了不起的特点是,它支持 Chrome、Firefox 和 Opera 的扩展。
|
||||
|
||||
因此,如果你想尝试一个新的快速、安全的浏览器,而又不离开你最喜欢的扩展,[Waterfox][20] 将是一个完美的选择。
|
||||
|
||||
- 下载:[Waterfox][21]
|
||||
|
||||
#### 6、Pale Moon(苍月)
|
||||
|
||||
![Pale Moon][22]
|
||||
|
||||
这是另一个基于 Firefox 代码的网页浏览器,具有隐私、安全、完全可定制和针对现代处理器优化等特点。对我来说,一个看起来很有趣的特点是,它继续支持 NPAPI 插件,如 Silverlight、Flash 和 Java。这些插件在其他浏览器(如 Chrome 和微软 Edge)中一直没有得到维护。
|
||||
|
||||
在这种情况下,如果你喜欢的一些网页因 Flash 等插件的停止维护而受到影响,也许 [Pale Moon][23] 可以让它们重新恢复。
|
||||
|
||||
- 下载:[Pale Moon][24]
|
||||
|
||||
#### 7、Falkon
|
||||
|
||||
![Falkon][25]
|
||||
|
||||
[Falkon][26] 是一个 KDE 浏览器,它与一个叫做 [QtWebEngine][27] 的技术一起工作,该技术提供了一个渲染引擎。它包括侧边栏中的书签和历史记录等功能,并默认带来了一个广告拦截器,它可以帮助你防止来自网站的追踪。
|
||||
|
||||
顺便说一句,这个浏览器最初只是为了教育目的而开始开发的;但现在,你可以在你的日常生活中使用它。我邀请你尝试它,并与我们分享你的经验。
|
||||
|
||||
- 下载:[Falkon][28]
|
||||
|
||||
#### 8、Epiphany(顿悟)
|
||||
|
||||
![GNOME Web][29]
|
||||
|
||||
这个导航器通常被称为 “GNOME Web”,它是一个专注于 Linux 体验的原生网页浏览器,它有一个简单的用户浏览界面。当然,简单并不意味着功能不强。
|
||||
|
||||
它显示网页的技术类似于 Mozilla 项目中使用的布局引擎,它最重要的一些特点是:
|
||||
|
||||
* 可定制的用户界面
|
||||
* 有 60 多种语言版本
|
||||
* Cookie 管理
|
||||
* 用于执行命令、Python 脚本、分组标签、选择你的样式表的扩展
|
||||
|
||||
如果你正在寻找一个简单而简约的浏览器,并且专门针对 Linux,那就是它了。
|
||||
|
||||
- 下载:[GNOME Web][30]
|
||||
|
||||
#### 9、Otter(水獭)
|
||||
|
||||
![Otter][31]
|
||||
|
||||
如果你还记得几年前 [Opera][32] 12 的模样,这个浏览器会让你想起这个用户界面。这个浏览器的主要目的是为实验用户提供强大的工具,而不影响他们继续浏览。
|
||||
|
||||
我注意到的一些有趣和重要的事情是,社区对持续贡献源代码的承诺,以改进这个浏览器。
|
||||
|
||||
如果你在 Linux 中浏览时正在寻找一个快速、安全和强大的浏览器,这个是一个不错的选择。
|
||||
|
||||
- 下载:[Otter][33]
|
||||
|
||||
#### 10、Midori(日文的“翠绿”)
|
||||
|
||||
![Midori][34]
|
||||
|
||||
以前有一个流行的浏览器叫 Midori,但在它与 [Astian 项目][35] 合并后,它的发展方向发生了变化。然而,由于 Snap 商店的存在,你仍然可以在你的 Linux 发行版上安装它。
|
||||
|
||||
它的三个最强大的功能是:
|
||||
|
||||
* 支持 Adblock 过滤列表
|
||||
* 隐私浏览
|
||||
* 管理 Cookie 和脚本
|
||||
|
||||
但真正让我震惊的是,它可以让你瞬间打开 1000 个标签,并能轻松创建网页应用;这后两个事实是来自 [它在 Snapcraft 的页面][36]。
|
||||
|
||||
- 下载:[Midori][36]
|
||||
|
||||
### 结论
|
||||
|
||||
记住,找到完美的浏览器将取决于你的需要和资源。总的来说,这一切都要归结为适合你的东西。
|
||||
|
||||
使用 [轻量级应用程序][37] 是当你的系统在硬件方面处于低水平时获得更好的计算体验的一种方式。
|
||||
|
||||
我避开了其他一些浏览器,比如 [Brave 或 Vivaldi][38],因为我的重点是在 Linux 上不太流行的轻量级网页浏览器。如果你知道还有一些你经常使用的浏览器,请在评论区提到它们。
|
||||
|
||||
如果这篇文章对你有帮助,请花点时间在社交媒体上分享;你也可以对开源有所作为。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/lightweight-web-browsers-linux/
|
||||
|
||||
作者:[Marco Carmona][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[wxy](https://github.com/wxy)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://itsfoss.com/author/marco/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://itsfoss.com/best-browsers-ubuntu-linux/
|
||||
[2]: https://itsfoss.com/install-chromium-ubuntu/
|
||||
[3]: https://itsfoss.com/open-source-browsers-linux/
|
||||
[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/Viper.png?resize=800%2C459&ssl=1
|
||||
[5]: https://github.com/LeFroid/Viper-Browser
|
||||
[6]: https://itsfoss.com/min-an-open-source-web-browser-for-minimalists/
|
||||
[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2018/02/min-web-browser-featured.jpeg?fit=800%2C450&ssl=1
|
||||
[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/Nyxt.png?resize=800%2C459&ssl=1
|
||||
[9]: https://itsfoss.com/nyxt-browser/
|
||||
[10]: https://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop
|
||||
[11]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/Lynx-2.png?resize=800%2C458&ssl=1
|
||||
[12]: https://itsfoss.com/gui-cli-tui/
|
||||
[13]: https://itsfoss.com/terminal-web-browsers/
|
||||
[14]: https://lynx.invisible-island.net/current/index.html
|
||||
[15]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/SeaMonkey-1.png?resize=800%2C459&ssl=1
|
||||
[16]: https://www.seamonkey-project.org/
|
||||
[17]: https://librewolf-community.gitlab.io/
|
||||
[18]: https://www.seamonkey-project.org/releases/
|
||||
[19]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/waterfox-1.png?resize=800%2C459&ssl=1
|
||||
[20]: https://itsfoss.com/waterfox-browser/
|
||||
[21]: https://www.waterfox.net/
|
||||
[22]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/palemoon.png?resize=800%2C459&ssl=1
|
||||
[23]: https://www.palemoon.org/
|
||||
[24]: https://linux.palemoon.org/
|
||||
[25]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/falkon-1.png?resize=800%2C459&ssl=1
|
||||
[26]: https://itsfoss.com/falkon-browser/
|
||||
[27]: https://wiki.qt.io/QtWebEngine
|
||||
[28]: https://www.falkon.org/download/
|
||||
[29]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/GNOME-Web.png?resize=800%2C458&ssl=1
|
||||
[30]: https://wiki.gnome.org/Apps/Web
|
||||
[31]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/Otter.png?resize=800%2C459&ssl=1
|
||||
[32]: https://itsfoss.com/install-opera-ubuntu/
|
||||
[33]: https://github.com/OtterBrowser/otter-browser/blob/master/INSTALL.md
|
||||
[34]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/Midori.png?resize=800%2C458&ssl=1
|
||||
[35]: https://astian.org/en/midori-browser/
|
||||
[36]: https://snapcraft.io/midori
|
||||
[37]: https://itsfoss.com/lightweight-alternative-applications-ubuntu/
|
||||
[38]: https://itsfoss.com/brave-vs-vivaldi/
|
||||
[39]: https://nyxt.atlas.engineer/
|
@ -0,0 +1,105 @@
|
||||
[#]: subject: "5 ways LibreOffice supports accessibility"
|
||||
[#]: via: "https://opensource.com/article/22/2/libreoffice-accessibility"
|
||||
[#]: author: "Don Watkins https://opensource.com/users/don-watkins"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14298-1.html"
|
||||
|
||||
LibreOffice 支持无障碍辅助的 5 种方式
|
||||
======
|
||||
|
||||
> 试试 LibreOffice 中的这些无障碍功能之一。你可能会发现更好的或替代的方式来完成日常工作。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202202/23/121309ow8jcu6f0d60eds8.jpg)
|
||||
|
||||
LibreOffice.org 是我首选的生产力套件,我在过去已经介绍了我如何将它作为一个 [图形化办公套件][2] 以及 [终端命令][3] 使用。
|
||||
|
||||
在这篇文章中,我想着重介绍 LibreOffice 如何支持使用无障碍辅助技术的人。
|
||||
|
||||
### 鼠标
|
||||
|
||||
鼠标是一项重要的发明,但它并不是对每个人都同样有效。例如,那些不能在屏幕上看到鼠标指针的人,或者不能在他们的桌子上实际操作鼠标的人,从鼠标中获益不多。
|
||||
|
||||
为了考虑到人们与电脑互动方式的不同,你可以在没有鼠标的情况下使用 LibreOffice。与应用中的大多数无障碍功能一样,这个功能对任何人都有帮助。即使你自己是一个鼠标用户,有时你也不想把你的手从键盘上移开。能够在“打字模式”下触发特定的 LibreOffice 动作,对于忙碌的打字员来说真的很方便。
|
||||
|
||||
你可以使用 `Alt` 键和菜单名称中的一个触发字母来打开 LibreOffice 主菜单中的每一个项目。在默认情况下,你不会看到这些触发字母,但当你按下 `Alt` 键时,它们就会出现。
|
||||
|
||||
![LibreOffice Writer menus with underlines][4]
|
||||
|
||||
要打开<ruby>文件<rt>File</rt></ruby>菜单,按住 `ALT+F`。要打开<ruby>格式<rt>Format</rt></ruby>菜单,按住 `ALT+O`。当菜单被打开后,你就可以释放按键。
|
||||
|
||||
在你打开一个菜单后,该菜单中的每个项目都有一个触发字母,或者你可以使用键盘上的**箭头**键导航到该项目并按下**回车**。
|
||||
|
||||
要关闭一个菜单而不做任何事情,按 `Esc` 键。
|
||||
|
||||
### 不用鼠标就能改变一个字体
|
||||
|
||||
LibreOffice 界面中的所有东西都可以从菜单中获得,即使你认为它只是工具栏中的一个元素。例如,你通常可能会将鼠标移动到格式化工具栏来改变字体,但你也可以通过选择文本,然后打开<ruby>格式<rt>Format</rt></ruby>菜单并选择<ruby>字符<rt>Character</rt></ruby>来打开字符对话框来改变字体。你可以使用 `Tab`、**箭头** 和 **回车** 键来浏览这个对话框。
|
||||
|
||||
这里需要注意的是,你可以在一个应用中使用许多不同的路径来达到同一个目标。每个场景都可能有不同的最佳路径,所以在处理任务时不要想得太线性。
|
||||
|
||||
### 常见的快捷方式
|
||||
|
||||
这里有一些 LibreOffice Writer 的快捷键:
|
||||
|
||||
* `F2`:公式栏
|
||||
* `Ctrl+F2`:插入字段
|
||||
* `F3`:自动文本
|
||||
* `F5`: 打开/关闭导航
|
||||
* `Shift+F5`:将光标移到上次保存文件时的位置
|
||||
* `Ctrl+Shift+F5`:打开导航,进入页面
|
||||
* `F7`:拼写
|
||||
* `F8`:同义词
|
||||
|
||||
以下是电子表格的快捷键:
|
||||
|
||||
* `Ctrl+Home`:返回到 A1 单元格
|
||||
* `Ctrl+End`:移到最后一个包含数据的单元格
|
||||
* `Home`:将光标移到当前行的第一个单元格
|
||||
* `End`:将光标移到当前行的最后一个单元格
|
||||
* `Shift+Home`:选择从当前单元格到当前行的第一个单元格的单元格
|
||||
|
||||
LibreOffice 的文档非常丰富,通过按键盘上的 `Alt+H` 或 `F1` 可以很容易地获取。
|
||||
|
||||
### 无障碍设置
|
||||
|
||||
关于更多的无障碍设置,请进入<ruby>工具<rt>Tools</rt></ruby>菜单,选择<ruby>选项<rt>Options</rt></ruby>。在选项对话框中,在左边的栏目中展开 LibreOffice 类别,然后点击<ruby>无障碍<rt>Accessibility</rt></ruby>。
|
||||
|
||||
选项包括:
|
||||
|
||||
* **在只读文本文件中使用文本选择光标**:这允许你在只读文档中移动,就像你可以编辑它一样,限制了你实际可以做的选择和复制文本。
|
||||
* **允许动画图像**:不是每个人都希望在工作时在他们的文档中出现移动的图像。你可以在这里进行调整。
|
||||
* **允许动画文本**:与图像一样,动画文本样式对一些人来说是有趣的,而对另一些人来说则是分散注意力或令人困惑的。
|
||||
|
||||
也有高对比度主题的选项。如果你在你的操作系统上使用高对比度模式,LibreOffice 会自动检测并改变它的主题来匹配。
|
||||
|
||||
### 键盘快捷方式
|
||||
|
||||
你可以通过设置自己的键盘快捷键来定制你与 LibreOffice 的交互方式。进入<ruby>工具<rt>Tools</rt></ruby>菜单,选择<ruby>自定义<rt>Customize</rt></ruby>(或者直接按 `Alt+T`,然后按 `C`)。
|
||||
|
||||
选择<ruby>键盘<rt>Keyboard</rt></ruby>标签,必要时按**箭头**键或用鼠标点击它(如果你还在使用鼠标)。
|
||||
|
||||
### 对所有人开放
|
||||
|
||||
让开源的应用无障碍化有利于所有的用户。通过尝试 LibreOffice 中的无障碍功能,你可能会发现更好的或替代性的方法来完成日常任务。无论你是否“需要”该功能,无障碍功能提供了选择。试试其中的一些,因为你可能会发现你喜欢的东西。如果你有一个 LibreOffice(或任何你喜欢的开源应用)似乎没有提供的要求,在其错误跟踪系统中提交一个功能请求来让该项目知道。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/2/libreoffice-accessibility
|
||||
|
||||
作者:[Don Watkins][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/don-watkins
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/code_computer_laptop_hack_work.png?itok=aSpcWkcl (Coding on a computer)
|
||||
[2]: https://opensource.com/article/21/9/libreoffice-tips
|
||||
[3]: https://opensource.com/article/21/3/libreoffice-command-line
|
||||
[4]: https://opensource.com/sites/default/files/uploads/libreoffice_menu_with_underlines.jpg (LibreOffice Writer menus with underlines)
|
||||
[5]: https://creativecommons.org/licenses/by-sa/4.0/
|
@ -3,20 +3,20 @@
|
||||
[#]: author: "Ankush Das https://itsfoss.com/author/ankush/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14295-1.html"
|
||||
|
||||
Kile:KDE 中的交互式跨平台 LaTeX 编辑器
|
||||
Kile:来自 KDE 的交互式跨平台 LaTeX 编辑器
|
||||
======
|
||||
|
||||
_**简介:Kile 是 KDE 公司为 Linux 提供的最好的 LaTeX 编辑器之一。它能提供什么?让我们来看一看。**_
|
||||
> Kile 是 Linux 上最好的 LaTeX 编辑器之一,来自 KDE。让我们来看一看它提供了什么?
|
||||
|
||||
你可以用 TeX/LaTeX 编辑器处理各种文件。不仅仅限于科学研究,你还可以添加你的代码,开始写书(学术/创作),或者起草文章。
|
||||
你可以用 TeX/LaTeX 编辑器处理各种文件。不仅仅限于科学研究,你还可以添加你的代码、开始写书(学术/创作)、或者起草文章。
|
||||
|
||||
如果你经常处理 LaTeX 文档,一个具有预览选项和若干功能的交互式解决方案应该会很方便。
|
||||
|
||||
Kile 是 KDE 的一个这样的选择,可用于 Linux 和其他平台。事实上,它是[可用于 Linux 的最佳 LaTeX 编辑器][1]之一,我们决定单独介绍它。
|
||||
Kile 是 KDE 提供选择之一,可用于 Linux 和其他平台。事实上,它是 [可用于 Linux 的最佳 LaTeX 编辑器][1] 之一,我们决定重点介绍一下它。
|
||||
|
||||
### 一个开源的集成 LaTeX 编辑器
|
||||
|
||||
@ -26,7 +26,7 @@ Kile 可能不是最受欢迎的选择,但它确实因其提供的东西而脱
|
||||
|
||||
如果你正在寻找一个简单的 LaTeX 编辑器,它可能不是完美的选择。然而,它尽力为你提供友好的体验,同时从一开始就为你提供指导。
|
||||
|
||||
让我强调以下一些特点。
|
||||
让我重点强调以下特点。
|
||||
|
||||
### Kile 的特点
|
||||
|
||||
@ -43,14 +43,12 @@ Kile 可能不是最受欢迎的选择,但它确实因其提供的东西而脱
|
||||
* 上百种预设模式来定义文档的类型(JSON、R 文档、VHDL、HTML 等)。
|
||||
* 日志查看器。
|
||||
* 转换文档的能力。
|
||||
* PDF 向导工具来添加/删除和转换 PDF 文件。
|
||||
* 添加/删除和转换 PDF 文件的 PDF 向导工具。
|
||||
* 反向和正向搜索功能。
|
||||
* 创建项目来组织文件的集合。
|
||||
* 创建项目以组织文件集合。
|
||||
* 大量的 LaTeX 选项,无需键入任何东西即可添加所需的命令(如创建一个列表,添加一个数学函数等)。
|
||||
* 易于在各章或各节中导航。
|
||||
* 使用小窗口预览浏览整个文件(如果文件太大,无法滚动)。
|
||||
|
||||
|
||||
* 在各章或各节中轻松导航。
|
||||
* 使用小窗口预览浏览整个文件(如果文件太大需要滚动)。
|
||||
|
||||
![][4]
|
||||
|
||||
@ -74,27 +72,25 @@ Kile 可能不是最受欢迎的选择,但它确实因其提供的东西而脱
|
||||
|
||||
### 在 Linux 中安装 Kile
|
||||
|
||||
你应该在默认的 Linux 仓库和软件中心找到 Kile。对于 KDE,你应该看到它被列在 Discover 中。
|
||||
你应该可以在默认的 Linux 仓库和软件中心找到 Kile。对于 KDE,你应该看到它被列在“发现”中。
|
||||
|
||||
不幸的是,它不提供 Flatpak 或 Snap 包。所以,你将不得不依靠从仓库中获得的标准软件包。
|
||||
|
||||
如果你依赖终端(基于 Ubuntu),你可以输入以下命令安装:
|
||||
|
||||
```
|
||||
|
||||
sudo apt install kile
|
||||
|
||||
sudo apt install kile
|
||||
```
|
||||
|
||||
对于Windows用户,你可以在[微软商店][8]中找到它。
|
||||
对于 Windows 用户,你可以在 [微软商店][8] 中找到它。
|
||||
|
||||
如果你感到好奇,你可以查看[源代码][9]或访问官方网站。
|
||||
如果你感到好奇,你可以查看 [源代码][9] 或访问官方网站。
|
||||
|
||||
[Kile][10]
|
||||
- [Kile][10]
|
||||
|
||||
### 总结
|
||||
|
||||
作为一个 LaTeX 用户,你应该发现所有的选项对高效的编辑经体验都很有用。如果你是 TeX/LaTeX 文档的新手,你仍然可以使用它的模板、快速函数、自动完成功能,使体验变得简单。
|
||||
作为一个 LaTeX 用户,你应该发现所有这些选项对高效的编辑经体验都很有用。如果你是 TeX/LaTeX 文档的新手,你仍然可以使用它的模板、快速函数、自动完成功能,使体验变得简单。
|
||||
|
||||
你最喜欢的 LaTeX 文档编辑器是什么?欢迎在下面的评论中告诉我。
|
||||
|
||||
@ -105,7 +101,7 @@ via: https://itsfoss.com/kile/
|
||||
作者:[Ankush Das][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
@ -0,0 +1,77 @@
|
||||
[#]: subject: "A guide to installing applications on Linux"
|
||||
[#]: via: "https://opensource.com/article/22/2/installing-applications-desktop-linux"
|
||||
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14305-1.html"
|
||||
|
||||
在 Linux 上安装应用指南:软件中心篇
|
||||
======
|
||||
|
||||
> 从我们的新电子书中获得关于在 Linux 上安装应用的所有不同方法的信息。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202202/25/111618skx1ckb35r3kmx4k.jpg)
|
||||
|
||||
当你想在你的手机上尝试一个新的应用时,你打开应用商店并安装该应用。这很简单,很快速,很高效。在这种提供应用的模式中,手机供应商可以让你确切地知道到哪里去获得一个应用,而应用的开发者也知道将他们的应用放在哪里,以便人们能够找到它们。
|
||||
|
||||
在手机使用这种创新的软件分发模式之前,Linux 正以“软件仓库”的形式使用它。正如这个术语所暗示的,这些是在互联网上传应用的地方,这样 Linux 用户就可以从一个中心位置浏览和安装它们。这个术语被缩短为 “repo”(代表 “repository”,而不是 “reposession”),但无论你叫它“仓库”、“应用商店”、“软件中心”、“包管理器”,还是其他什么,它都是一个好系统,几十年来一直为 Linux 桌面用户服务。
|
||||
|
||||
最起码在 Linux 上安装应用很像在手机上安装应用。如果你能用一个安装,你也可以用另外一个安装。
|
||||
|
||||
- 下载我们的电子书:[在 Linux 上安装应用指南][2]
|
||||
|
||||
### 软件中心
|
||||
|
||||
在 GNOME 桌面上,你在桌面上看到的软件仓库是一个应用,简单地说,叫 “<ruby>软件<rt>Software</rt></ruby>”。你可以把这个应用看成是一个极其特殊的网页浏览器。它寻找可以从互联网上安装的软件,将所有可用的软件收集到分类中,并将其显示在你的桌面上。
|
||||
|
||||
![GNOME Software][3]
|
||||
|
||||
在开始屏幕中,你有几个选项:
|
||||
|
||||
* 搜索一个你已经熟悉的应用。要做到这一点,点击窗口左上角的放大镜图标。
|
||||
* 按类别浏览。这可以在窗口的底部找到。
|
||||
* 按最近时间和推荐浏览。这些都列在动画横幅和它下面的图标中。
|
||||
|
||||
当你点击一个你看起来感兴趣的应用时,会打开一个功能页面,这样你就可以看到截图并阅读软件的简短描述。
|
||||
|
||||
### 安装一个应用
|
||||
|
||||
当你找到了你想要安装的软件,点击应用功能页面顶部的“<ruby>安装<rt>Install</rt></ruby>”按钮。
|
||||
|
||||
![An application page in GNOME Software][5]
|
||||
|
||||
安装完毕后,“<ruby>安装<rt>Install</rt></ruby>”按钮就会变成“<ruby>启动<rt>Launch</rt></ruby>”按钮,所以你可以选择启动你刚刚安装的应用。
|
||||
|
||||
如果你现在不想启动该应用,你可以随时在你的“<ruby>活动<rt>Activities</rt></ruby>”菜单中找到它,它与你电脑上已有的所有其他应用放在一起。
|
||||
|
||||
### 从更多的地方获得更多的应用
|
||||
|
||||
你的 Linux 桌面有专门为它打包的应用,但在今天的世界里,到处都有很多开源的东西。你可以通过将“第三方”仓库添加到你的桌面应用商店中来获得更多的应用。当然,这些术语并不完全正确:在一个无论如何都是由每个人创造软件的世界里,什么是“第三方”?当没有任何东西需要花钱时,什么是应用商店?撇开术语不谈,一个流行的第三方软件库是 [Flathub.org][6]。
|
||||
|
||||
要在你的 Linux 桌面上增加另一个应用源,基本上是“安装”一个源到你的应用商店。对于 Flathub,下载 **Flathub 仓库文件**,然后用 **GNOME 软件**安装它,就像它是一个应用一样。它不是一个应用。它是一个应用 _源_,但过程是一样的。
|
||||
|
||||
### 了解更多
|
||||
|
||||
如果没有一堆其他方法来执行任何给定的任务,那就不是 Linux 了。灵活性是建立在 Linux 系统中的,所以虽然 GNOME “软件”提供了一种获取应用的简单方法,但还有很多其他方法,包括安装脚本、安装向导、AppImages,当然还有直接从源代码编译。你可以从我们的新电子书 [在 Linux 上安装应用][2] 中获得所有这些安装方法的信息。它是免费的,所以请阅读吧。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/2/installing-applications-desktop-linux
|
||||
|
||||
作者:[Seth Kenlon][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/seth
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/bitmap_1.png?itok=YkthYzSf (Linux packages)
|
||||
[2]: https://opensource.com/downloads/installing-linux-applications-ebook
|
||||
[3]: https://opensource.com/sites/default/files/gnome-software_1.png (GNOME Software)
|
||||
[4]: https://creativecommons.org/licenses/by-sa/4.0/
|
||||
[5]: https://opensource.com/sites/default/files/gnome-software-steam.png (An application page in GNOME Software)
|
||||
[6]: http://flathub.org/setup
|
@ -0,0 +1,107 @@
|
||||
[#]: subject: "Edit text on Linux with KWrite and Kate"
|
||||
[#]: via: "https://opensource.com/article/22/2/edit-text-linux-kde"
|
||||
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14310-1.html"
|
||||
|
||||
用 KWrite 和 Kate 在 Linux 上编辑文本
|
||||
======
|
||||
|
||||
> 两个 Linux KDE 文本编辑器。一个强大的 KTextEditor 库。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202202/27/144611kfsjnefsnlc2c9ee.jpg)
|
||||
|
||||
文本编辑器通常是一个很好的示例应用,可以展示一个编程框架能够产生什么。我自己在关于 [wxPython、PyQt][2] 和 [Java][3] 的文章中至少写过三个文本编辑器的例子。它们被视为容易创建的应用的原因是,这些框架提供了许多最难编写的代码。我认为这也是大多数操作系统提供简单的桌面文本编辑器的原因。它们对用户有用,对开发者也很容易开发。
|
||||
|
||||
在 KDE Plasma 桌面上,有两个文本编辑器可供选择:简陋的 KWrite 和强大的 Kate。它们之间共享一个来自 KDE 框架的名为 KTextEditor 的库,它提供了强大的文本编辑选项,所以无论你选择哪一个,你都拥有比你可能习惯的、由桌面提供的“基本”文本编辑器更多的功能。在不同的文本编辑器中使用相同的组件,意味着一旦你习惯了 KDE 中的文本编辑界面,你基本上就能熟悉它们了,如 KWrite、Kate、KDevelop 等。
|
||||
|
||||
### 安装 KWrite 或 Kate
|
||||
|
||||
KWrite 和 Kate 在同一个 [开发库][4] 中维护。
|
||||
|
||||
然而,它们是作为独立的应用发布的,并且有不同的使用场景。
|
||||
|
||||
如果你安装了 KDE Plasma 桌面,你可能已经安装了 KWrite,但你可能需要单独安装 Kate。
|
||||
|
||||
```
|
||||
$ sudo dnf install kwrite kate
|
||||
```
|
||||
|
||||
KWrite 可以从 [apps.kde.org/kwrite][5] 获得,而 Kate 可以从 [apps.kde.org/kate/][6] 获得。
|
||||
|
||||
两者都可以通过 KDE “<ruby>发现<rt>Discover</rt></ruby>” 安装,KWrite 可以 [作为 flatpak 安装][7]。
|
||||
|
||||
### KWrite,不那么基本的编辑器
|
||||
|
||||
开始使用 KWrite 很容易。你从你的应用菜单中启动它,然后开始打字。如果你在最基本的文本编辑器之外没有别的需求,那么你可以把它当作一个简单的电子记事本。
|
||||
|
||||
![The KWrite text editor][8]
|
||||
|
||||
所有通常的惯例都适用。在大文本区域输入文字,完成后点击保存按钮。
|
||||
|
||||
然而,KWrite 与标准的桌面编辑器不同的是,它使用 KTextEditor 库。
|
||||
|
||||
### 书签
|
||||
|
||||
当你在 KWrite 或 Kate 中工作时,你可以创建临时书签来帮助你找到文档中的重要位置。要创建一个书签,按 `Ctrl+B`。你可以通过在“<ruby>书签<rt>Bookmark</rt></ruby>”菜单中选择它来移动到书签。
|
||||
|
||||
书签不是永久性的元数据,它们也不会作为文档的一部分被存储,但当你在工作中需要在各部分之间来回移动时,它们是有用的工具。在其他文本编辑器中,我可以只是输入一些随机的词,比如 “foobar”,然后对这个字符串进行“<ruby>查找<rt>Find</rt></ruby>”,以返回到那个位置。书签是解决这个问题的一个更优雅的方案,而且它们不会有让你的文档充满占位符的风险,因为你可能忘记删除它们。
|
||||
|
||||
### 高亮显示
|
||||
|
||||
在 KWrite 和 Kate 中,你都可以激活语法高亮,这样你就可以深入了解你正在处理的文本。在其他文字处理程序中,你可能不会有意识地使用高亮显示,但如果你曾经使用过带有自动拼写和语法检查的编辑器,你就会看到一种高亮显示。在大多数现代文字处理程序中,拼写错误被标记的红色警告线就是一种语法高亮的形式。KWrite 和 Kate 可以同时通知你写作中的错误和成功。
|
||||
|
||||
要查看拼写错误,请进入“<ruby>工具<rt>Tools</rt></ruby>”菜单,选择“<ruby>拼写<rt>Spelling<rt></ruby>”。从子菜单中,激活“<ruby>自动拼写检查<rt>Automatic Spell Checking</rt></ruby>”。
|
||||
|
||||
要获得你以特定格式写的东西的视觉反馈,例如 [Markdown][11]、HTML 或像 [Python][12] 这样的编程语言,去“<ruby>工具<rt>Tools</rt></ruby>”菜单,选择“<ruby>模式<rt>Mode</rt></ruby>”。有很多模式,分为几个类别。找到你要写的格式并选择它。文档模式加载在高亮模式中。你可以通过选择“<ruby>高亮<rt>Highlighting</rt></ruby>”而不是“<ruby>模式<rt>Mode</rt></ruby>”来覆盖一个模式的高亮方案。
|
||||
|
||||
![Text highlighting][13]
|
||||
|
||||
我最喜欢的功能之一是窗口右侧的文档概览。它基本上是整个文档的一个非常细微的缩略图,所以你只需点击一下就可以滚动到特定区域。它可能看起来太小而无用,但它比人们想象的更容易确定一个章节的标题或文档中的一个近似区域,并通过点击就能接近它。
|
||||
|
||||
### Kate 的与众不同之处
|
||||
|
||||
由于 KWrite 和 Kate 使用相同的底层组件,你可能想知道为什么你需要从 KWrite 升级到 Kate。如果你决定试用 Kate,你不会因为文本编辑而这样做。所有影响你如何输入和与你的文本互动的功能在这两个应用程序之间都是一样的。然而,Kate 为编码者增加了很多功能。
|
||||
|
||||
![Coding in Kate][14]
|
||||
|
||||
Kate 有一个侧边栏,你可以查看你的文件系统或项目目录。值得注意的是,Kate 有项目的概念,所以它可以将一个代码文件与同一目录下的头文件联系起来,比如说。它还有一个弹出式终端(只需按下 `F4`),并能将你的文档中的文本通过管道传送到终端会话中。
|
||||
|
||||
它还有一个会话管理器,这样你就可以为不同的活动配置一个独特的 Kate。
|
||||
|
||||
### 选择你的 Linux 文本编辑器
|
||||
|
||||
我们很容易忽视 KWrite 和 Kate。因为它们都是与桌面一起出现的,所以很容易把它们视作开发者强制包含的简单文本编辑器的例子。但这远远不准确。KWrite 和 Kate 是 KDE 系列应用中的典范。它们例证了 KDE 框架所提供的内容,并为期待强大、有意义和有用的 KDE 应用奠定了基础。
|
||||
|
||||
了解一下 KWrite 和 Kate,看看哪一个适合你。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/2/edit-text-linux-kde
|
||||
|
||||
作者:[Seth Kenlon][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/seth
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/laptop_screen_desk_work_chat_text.png?itok=UXqIDRDD (Person using a laptop)
|
||||
[2]: https://opensource.com/article/17/4/pyqt-versus-wxpython
|
||||
[3]: https://opensource.com/article/20/12/write-your-own-text-editor
|
||||
[4]: https://invent.kde.org/utilities/kate
|
||||
[5]: http://apps.kde.org/kwrite
|
||||
[6]: https://apps.kde.org/kate
|
||||
[7]: https://opensource.com/article/21/11/install-flatpak-linux
|
||||
[8]: https://opensource.com/sites/default/files/kwrite-ui.jpg (The KWrite text editor)
|
||||
[9]: https://creativecommons.org/licenses/by-sa/4.0/
|
||||
[10]: https://www.gutenberg.org/cache/epub/41445/pg41445.txt
|
||||
[11]: https://opensource.com/article/19/9/introduction-markdown
|
||||
[12]: https://opensource.com/article/17/10/python-101
|
||||
[13]: https://opensource.com/sites/default/files/kwrite-ui-mode.jpg (Text highlighting)
|
||||
[14]: https://opensource.com/sites/default/files/kate-ui.jpg (Coding in Kate)
|
@ -0,0 +1,133 @@
|
||||
[#]: subject: "How to Clean Up Snap Package Versions in Linux [Quick Tip]"
|
||||
[#]: via: "https://itsfoss.com/clean-snap-packages/"
|
||||
[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14302-1.html"
|
||||
|
||||
如何在 Linux 中清理 Snap 包的版本
|
||||
======
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202202/24/153025zxi8112125hrxrl8.jpg)
|
||||
|
||||
Snap 软件包并不是每个人都喜欢的,但它们是 Ubuntu 生态系统中不可或缺的一部分。
|
||||
|
||||
它有其优点和缺点。其中一个缺点是,Snap 包通常体积较大,占用大量的磁盘空间。如果你的磁盘空间不够用,特别是在根分区上,这可能是一个问题。
|
||||
|
||||
让我分享一个巧妙的技巧,你可以用它来减少 Snap 包使用的磁盘空间。
|
||||
|
||||
### 清理旧的 Snap 包版本以释放磁盘空间
|
||||
|
||||
与 snap 有关的系统文件都存放在 `/var/lib/snapd` 目录下。根据你所安装的 Snap 包的数量,这个目录的大小可能在几 GB。不要只听我的一面之词。通过 [使用 du 命令检查目录大小][1] 来进行评估。
|
||||
|
||||
```
|
||||
$ sudo du -sh /var/lib/snapd
|
||||
5.4G /var/lib/snapd
|
||||
```
|
||||
|
||||
你也可以使用磁盘使用分析器这个 GUI 工具来查看 [Ubuntu 的磁盘使用情况][2]。
|
||||
|
||||
![Snap disk usage][3]
|
||||
|
||||
这可真够多的,对吧?你可以在这里腾出一些磁盘空间。根据设计,Snap 至少会在你的系统上保留一个你所安装的软件包的旧版本。你可以通过使用 Snap 命令看到这种行为:
|
||||
|
||||
```
|
||||
snap list --all
|
||||
```
|
||||
|
||||
你应该看到同一个软件包被列了两次,而且版本和修订号都不同。
|
||||
|
||||
![Snap keeps at least two versions of each package][4]
|
||||
|
||||
为了释放磁盘空间,你可以删除额外的软件包版本。你怎么知道要删除哪一个呢?你可以看到,这些较旧的软件包被标记为“禁用”。
|
||||
|
||||
不要担心。你不需要手动操作。由于 Alan Pope 在 [Snapcraft][5] 团队工作时写的一个灵巧的 bash 脚本,有一种自动的方法可以做到。
|
||||
|
||||
我希望你知道 [如何创建和运行 bash shell 脚本][6]。基本上,创建一个名为 `clean-snap.sh` 的新文件,并在其中添加以下几行。
|
||||
|
||||
```
|
||||
#!/bin/bash
|
||||
# Removes old revisions of snaps
|
||||
# CLOSE ALL SNAPS BEFORE RUNNING THIS
|
||||
set -eu
|
||||
snap list --all | awk '/disabled/{print $1, $3}' |
|
||||
while read snapname revision; do
|
||||
snap remove "$snapname" --revision="$revision"
|
||||
done
|
||||
```
|
||||
|
||||
保存它并关闭编辑器。要运行这个脚本,把它放在你的主目录中,然后 [在 Ubuntu 中打开终端][7],运行这个命令:
|
||||
|
||||
```
|
||||
sudo bash clean-snap.sh
|
||||
```
|
||||
|
||||
你可以看到,它开始删除旧版本的软件包。
|
||||
|
||||
![Removing old snap package versions][8]
|
||||
|
||||
如果你现在检查 Snap 使用的磁盘空间,你会发现现在的目录大小已经减少了。
|
||||
|
||||
```
|
||||
$ sudo du -sh /var/lib/snapd
|
||||
3.9G /var/lib/snapd
|
||||
```
|
||||
|
||||
如果这对你有用,你可以偶尔运行这个命令。
|
||||
|
||||
#### 这个脚本是如何工作的?
|
||||
|
||||
如果你对这个脚本的作用感到好奇,让我来解释一下。
|
||||
|
||||
你已经看到了 `snap list -all` 命令的输出。它的输出被传递给 [awk 命令][9]。Awk 是一个强大的脚本工具。
|
||||
|
||||
`awk '/disabled/{print $1, $3}'` 部分在每一行中寻找字符串 `disabled`,如果找到它,它将提取第一列和第三列。
|
||||
|
||||
这个输出被进一步传递给 `while` 和 `read` 命令的组合。读取命令获取第一列的 Snap 包名和第三列的修订号变量。
|
||||
|
||||
然后,这些变量被用来运行 `snap remove` 命令,用 Snap 包名和它的修订号来删除。
|
||||
|
||||
只要发现有包含 `disabled` 字符串的行,就会运行 `while` 循环。
|
||||
|
||||
如果你对 shell 脚本略知一二,这一切就很容易理解了。如果你不熟悉,我们有一个 [初学者的 bash 教程系列][10] 给你。
|
||||
|
||||
### 你拿回了你的空间了吗?
|
||||
|
||||
你可能会看到一些论坛建议将 Snap 软件包的保留值设置为 2。
|
||||
|
||||
```
|
||||
sudo snap set system refresh.retain=2
|
||||
```
|
||||
|
||||
我认为现在不需要了。现在 Snap 的默认行为是为任何软件包保存两个版本。
|
||||
|
||||
总而言之,如果你的空间不够用,摆脱额外的软件包版本肯定是 [释放 Ubuntu 磁盘空间的方法][11] 之一。
|
||||
|
||||
如果这个教程帮助你释放了一些空间,请在评论区告诉我。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/clean-snap-packages/
|
||||
|
||||
作者:[Abhishek Prakash][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://itsfoss.com/author/abhishek/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://linuxhandbook.com/find-directory-size-du-command/
|
||||
[2]: https://itsfoss.com/check-free-disk-space-linux/
|
||||
[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/snap-disk-usage.png?resize=800%2C323&ssl=1
|
||||
[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/snap-keeps-two-versions-of-each-package.png?resize=800%2C347&ssl=1
|
||||
[5]: https://snapcraft.io/
|
||||
[6]: https://itsfoss.com/run-shell-script-linux/
|
||||
[7]: https://itsfoss.com/open-terminal-ubuntu/
|
||||
[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/removing-old-snap-package-versions.png?resize=800%2C445&ssl=1
|
||||
[9]: https://linuxhandbook.com/awk-command-tutorial/
|
||||
[10]: https://linuxhandbook.com/tag/bash-beginner/
|
||||
[11]: https://itsfoss.com/free-up-space-ubuntu-linux/
|
@ -4,12 +4,14 @@
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "wxy"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14286-1.html"
|
||||
|
||||
在安卓手机上使用 Linux 终端
|
||||
======
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202202/19/190329mrnlr1fzkrmeewe5.jpg)
|
||||
|
||||
想练习 Linux 命令吗?你不需要为此而安装一个完整的发行版。
|
||||
|
||||
有很多 [让你在线使用 Linux 终端的网站][1]。这些网站在桌面上运行良好,但在移动设备上却不适合。
|
@ -0,0 +1,73 @@
|
||||
[#]: subject: "Why I love KDE for my Linux desktop"
|
||||
[#]: via: "https://opensource.com/article/22/2/why-i-love-linux-kde"
|
||||
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "wxy"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14311-1.html"
|
||||
|
||||
为什么我喜欢将 KDE 作为我的 Linux 桌面
|
||||
======
|
||||
|
||||
> KDE Plasma 桌面的目标是整合、一致和定制的完美结合。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202202/27/161217bz1a9r1r9s1z11ns.jpg)
|
||||
|
||||
开源引以为豪的事情之一是选择。你不必满足于你不喜欢的东西。你可以改变你的文件管理器、你的 [文本编辑器][2],你甚至有超过 [24 个桌面][3] 可以选择。和许多 Linux 用户一样,我一开始经常切换自己使用的桌面。最初我不知道自己喜欢什么,因为我还没有尝试过所有可用的东西。在 2008 年 1 月的一个好日子,KDE 4.0 发布了,从我看到 Plasma 桌面的那一刻起,我就知道这是我一直在等待的 Linux 桌面(那时我成为 Linux 用户才一年,我想我没必要等太久)。尽管我的笔记本上有 GNOME,我的树莓派上有 [Fluxbox][4],可能还有其他一些组合,但我认为自己是 Plasma 桌面的用户,也是 KDE 社区的一员。
|
||||
|
||||
### 我爱 KDE 的三个理由
|
||||
|
||||
爱上 KDE 的理由有很多,但这里有我的三个理由:
|
||||
|
||||
#### 一致性
|
||||
|
||||
![Dolphin 文件管理器][5]
|
||||
|
||||
一致性是教给用户一个新工具的重要部分。最理想的情况是,一个人在一个应用程序中学习了一些东西,然后在不知不觉中把同样的知识转移到另一个应用程序中。KDE 项目的目标是在其所有的应用程序中实现一致性,这也是 KDE 框架存在的原因之一。越多 KDE 开发者使用框架,用户需要学习的东西就越少,因为使用过一个应用程序的用户已经熟悉了该框架所提供的关键组件。
|
||||
|
||||
大量的代码在应用程序之间被重复使用。Konsole 可以作为 Dolphin 和 Kate 的一个面板启动。工具栏配置选项在所有应用程序中基本相同。有一些重要的惯例,比如用单次点击来打开一个文件或文件夹,而不是双击(你会节省几个微秒,相信我),以及可靠的右键菜单选项。
|
||||
|
||||
KDE 的伟大之处在于,当你想做一件你以前从未做过的事情时,你通常可以猜到你应该如何实现它。你被 KDE 的内部一致性所训练,知道应该怎么做。这并不总是有效的,毕竟你可能找错了地方,或者你可能试图让两种技术一起工作,而这两种技术没有过互相影响,但一般来说,你知道在哪里寻找一个选项,或者你知道在哪里拖动一个文件,或者何时右击一个对象,或者长按一个按钮。你通过实践来学习 KDE,那是一种很好的感觉。
|
||||
|
||||
#### 整合
|
||||
|
||||
![Gwenview 参考了 Krita][7]
|
||||
|
||||
KDE 项目被很多人称为桌面,但还有一群用户认为 KDE 更像是一套应用程序。他们都是正确的!
|
||||
|
||||
你可以运行 Plasma 桌面,也可以运行一个不同的桌面或窗口管理器,而只使用 KDE 应用程序。有很多东西可以选择,它们一起构成了一个完整的操作系统,影响了操作系统的风格倾向。当然,还有一些工作仍在进行中,但在我每天使用的应用程序中,有用于联系人、电子邮件和日历的 Kontact 套件,用于视频编辑的 Kdenlive,用于插图和摄影的 Krita,用于文件管理的 Dolphin,用于 RSS 订阅的 Akregator,用于存档的 Ark,用于终端的 Konsole,用于播放音乐的 Juk,用于从我的手机传输文件的 KDE Connect,这个名单还在继续增长。我并不是只安装 K 应用,因为在 KDE 开发之外也有很多伟大的应用程序,但是有这样一套完整的工具使用同一套框架和库是很好的。它提供了凝聚力,这使得整合成为可能。
|
||||
|
||||
#### 定制
|
||||
|
||||
![系统设置][8]
|
||||
|
||||
Plasma 桌面认识到,不同的用户对他们的工作空间有不同的要求和偏好。KDE 中几乎所有的东西都可以定制。你可以改变你的主题,你可以改变窗口装饰的布局,你可以改变打开一个文件所需的点击次数,什么是可点击的,什么是可拖动的,你可以在窗口内移动面板,然后当你不希望这些设置适用于某个应用程序时,你可以为它们设置特定的窗口覆盖项。
|
||||
|
||||
如果这听起来让人不知所措,也没错。但你不应该记住或甚至知道所有可能的定制。默认值是令人愉快的直观,而且大部分的行为是你期望的桌面行为。有一些小的 KDE 惯例你可能要习惯,但是当你发现你不喜欢的东西时,你知道因为它是 KDE,它可以被改变。你离开找到正确的旋钮或转盘来改变这个设置只距离一个参考文档。
|
||||
|
||||
### 让 Linux KDE 成为你自己的
|
||||
|
||||
我配置 Plasma 桌面的方式与我在会议和工作中看到的其他桌面不同,它是我在生活中尝试过的所有桌面中最喜欢的古怪东西的综合体。而这正是 KDE 的特别之处。它能适应我的每一个奇思妙想,甚至是非理性的奇思妙想。下次你必须在桌面之间做出选择时,看看 KDE 吧。如果你不喜欢你所看到的,给它点时间。你要么学会爱上它(单击操作就很好,我发誓),要么你最终会改变它。无论哪种方式,你都赢了。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/2/why-i-love-linux-kde
|
||||
|
||||
作者:[Seth Kenlon][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[wxy](https://github.com/wxy)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/seth
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/linux_keyboard_desktop.png?itok=I2nGw78_ (Linux keys on the keyboard for a desktop computer)
|
||||
[2]: https://opensource.com/article/21/2/open-source-text-editors
|
||||
[3]: https://opensource.com/article/20/5/linux-desktops
|
||||
[4]: https://opensource.com/article/19/12/fluxbox-linux-desktop
|
||||
[5]: https://opensource.com/sites/default/files/kde-dolphin-nav.jpg (Dolphin file manager)
|
||||
[6]: https://creativecommons.org/licenses/by-sa/4.0/
|
||||
[7]: https://opensource.com/sites/default/files/kde-gwenview-integration.jpg (Gwenview referencing Krita)
|
||||
[8]: https://opensource.com/sites/default/files/kde-settings-theme_0.jpg (System settings)
|
@ -0,0 +1,109 @@
|
||||
[#]: subject: "How to make KDE look like GNOME on Linux"
|
||||
[#]: via: "https://opensource.com/article/22/2/make-kde-look-like-gnome"
|
||||
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14314-1.html"
|
||||
|
||||
如何让 KDE 看起来像 GNOME
|
||||
======
|
||||
|
||||
> 在不放弃你的 Plasma 桌面的情况下获得 GNOME 的感觉。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202202/28/121405fxmzdms3a4p4mspa.jpg)
|
||||
|
||||
GNOME 有一种极简主义设计的倾向。它是一种美丽的桌面体验,并且是第一个在我使用 Linux 时引起别人赞叹的自由桌面。然后(请原谅我的形而上的哲学思考),没有复杂性就没有极简主义,而 KDE 以其极具定制性而闻名。我认为测试一下 KDE 的配置可能会很有趣,并尝试在 KDE Plasma 桌面上重新实现,至少在表面上实现 GNOME 的体验。
|
||||
|
||||
如果你尝试这个,请在一个临时用户帐户中进行。这些变化相对来说比较剧烈,撤销它以回到你的标准 KDE 布局可能是一个很大的工作。
|
||||
|
||||
### Adwaita 主题
|
||||
|
||||
GNOME 的默认主题叫做 Adwaita,是为 GTK 设计的,这是 GNOME 用于窗口和部件的工具包。KDE 使用 Qt 工具包,但 Fedora-Qt 项目已经开发了一个模仿 Adwaita 的 Qt 主题。这是在 KDE 上模仿 GNOME 的第一步,也是最明显的一步。使用你的发行版的包管理器安装 Adwaita for Qt:
|
||||
|
||||
```
|
||||
$ sudo dnf install adwaita-qt{,5}
|
||||
```
|
||||
|
||||
在基于 Debian 的发行版上,请使用 `apt` 命令而不是 `dnf`。
|
||||
|
||||
安装完毕后,进入“<ruby>系统设置<rt>System Settings</rt></ruby>”,选择“<ruby>应用风格<rt>Application Style</rt></ruby>”。选择你喜欢的 Adwaita 主题变体:有一个浅色主题和一个深色主题,以及两者之间的变化。点击“<ruby>应用<rt>Apply</rt></ruby>”按钮来更新你的主题,但先不要关闭这个控制面板。
|
||||
|
||||
### 窗口装饰
|
||||
|
||||
在“<ruby>应用风格<rt>Application Style</rt></ruby>”窗口的左侧面板中选择“<ruby>窗口装饰<rt>Window Decorations</rt></ruby>”分类。如果有一个适合 Adwaita 的标题栏样式,通过选择它并点击“<ruby>应用<rt>Apply</rt></ruby>”来激活它。如果没有安装额外的装饰,点击面板右下方的“<ruby>获取新窗口装饰<rt>Get new window decorations</rt></ruby>”按钮,下载合适的东西。我使用了用户 x-varlesh-x 提供的 “Arc” 主题,但你可以四处看看,看看什么最适合你的其他主题。
|
||||
|
||||
GNOME 著名的是它的窗口标题栏上只有一个按钮,所以导航到“<ruby>标题栏按钮<rt>Titlebar Buttons</rt></ruby>”标签,然后通过将“<ruby>关闭<rt>Close</rt></ruby>”按钮从标题栏图像拖到处置区域来删除所有按钮。
|
||||
|
||||
![Removing buttons][2]
|
||||
|
||||
取消选择“<ruby>显示标题栏按钮提示<rt>Show titlebar button tooltips</rt></ruby>”,因为 GNOME 不倾向于在系统部件上做提示。
|
||||
|
||||
点击“<ruby>应用<rt>Apply</rt></ruby>”来保存你的修改。
|
||||
|
||||
### GTK 主题
|
||||
|
||||
在 KDE 上,使用 GTK 的应用通常会被重新主题化成与 KDE 的默认主题一致。现在你已经把你的主题从 KDE Breeze 改为 GNOME Adwaita,你必须告诉 GTK 使用 Adwaita 主题。
|
||||
|
||||
点击“<ruby>应用风格<rt>Application Style</rt></ruby>”面板底部的“<ruby>配置 GNOME/GTK 应用风格<rt>Configure GNOME/GTK application style</rt></ruby>”按钮,在下拉菜单中选择 “Adwaita”。
|
||||
|
||||
### 工作区行为
|
||||
|
||||
GNOME 在视觉上比 KDE 更安静,所以在“<ruby>系统设置<rt>System Settings</rt></ruby>”中找到“<ruby>工作区行为<rt>Workspace behavior</rt></ruby>”面板,停用“<ruby>在鼠标悬停时显示信息提示<rt>Display informational tooltips on mouse hover</rt></ruby>”和“<ruby>显示状态变化的视觉反馈<rt>Display visual feedback for status changes</rt></ruby>”。
|
||||
|
||||
你也可以把打开文件和文件夹改为需要双击而不是单击(在实际中,这对我来说太不方便了)。
|
||||
|
||||
### 图标和光标
|
||||
|
||||
你可以在“<ruby>系统设置<rt>System Settings</rt></ruby>”中把光标改为 Adwaita 主题,然后选择一个图标主题。我喜欢 Breeze 的图标,但它们确实感觉像 KDE。GNOME 使用 Adwaita 图标集,但由于它们是为 GNOME 设计的,所以缺少一些重要的 KDE 组件的图标。你可以点击“<ruby>图标<rt>Icons</rt></ruby>”控制面板中的“<ruby>获取新图标<rt>Get New Icons</rt></ruby>”按钮来浏览很多图标集,最后我选择了用户 alvatip 提供的 “Nordzy”。不过,有很多不错的图标集可用,查看它们,看看你喜欢什么。我发现任何不属于 Breeze 的东西都会使 KDE 看起来与我习惯的东西有足够的不同。
|
||||
|
||||
### 系统面板
|
||||
|
||||
GNOME 的面板在屏幕的顶部,而 KDE 的面板默认在屏幕的底部。GNOME 的面板在默认情况下也是比较空的,所以我发现最简单的做法是先把当前的 KDE 面板完全删除。
|
||||
|
||||
右键点击并选择“<ruby>编辑面板<rt>Edit panel</rt></ruby>”。进入编辑模式后,再次右键点击面板,选择“<ruby>删除面板<rt>Remove panel</rt></ruby>”。当它消失了,右击桌面上的任何地方,选择“<ruby>添加面板<rt>Add panel</rt></ruby>”并添加一个空面板。这样就在屏幕底部添加了一个面板,所以右击它,选择“<ruby>编辑面板<rt>Edit panel</rt></ruby>”,然后点击并拖动“<ruby>屏幕边缘<rt>Screen Edge</rt></ruby>”按钮到屏幕的顶部。
|
||||
|
||||
当仍处于编辑模式时,点击“<ruby>添加部件<rt>Add widgets</rt></ruby>”按钮,将“<ruby>应用仪表板<rt>Application dashboard</rt></ruby>”部件添加到面板的最左端。然后从“<ruby>编辑面板<rt>Edit panel</rt></ruby>”视图中添加一个“<ruby>间隔<rt>Spacer</rt></ruby>”块,然后是一个“<ruby>时钟<rt>Clock</rt></ruby>”,然后是另一个“<ruby>间隔<rt>Spacer</rt></ruby>”。你可以拖动这些小部件来排列它们,所以我发现最简单的做法是添加上应用仪表板和时钟,然后是两个间隔,再把它们排列起来。
|
||||
|
||||
![Editing the panel][3]
|
||||
|
||||
你可以右键点击每个小组件来定制图标和布局。例如,我把日期从时钟上移走了,因为它在附加了日期后看起来很挤,尽管 GNOME 确实包含了日期。
|
||||
|
||||
通过进入“<ruby>系统设置<rt>System Settings</rt></ruby>”,选择一个深色的 Plasma 主题,比如 “Breeze Dark”,将面板改为黑色。
|
||||
|
||||
### GNOME Plasma 桌面
|
||||
|
||||
通过一些快速的调整,你的桌面现在在各个方面接近于 GNOME。布局是类似的。
|
||||
|
||||
![GNOME layout][5]
|
||||
|
||||
应用仪表板提供了一个 GNOME 风格的应用启动器。
|
||||
|
||||
![Application dashboard][6]
|
||||
|
||||
其他小的修改进一步有助于产生这种错觉。例如,我简化了 Dolphin 文件管理器,去掉了“<ruby>位置<rt>Places</rt></ruby>”面板,也去掉了工具栏上的大部分按钮。
|
||||
|
||||
### 一个不同的视角
|
||||
|
||||
这不是一个精确的匹配,比我更具钻研精神的人可以做的更多,得到更接近正确的结果。然而,像这样有趣的变化证明了 KDE 是多么的灵活,拥有大量的选项意味着你可以缩减你的交互内容以适应你的偏好。一个类似 GNOME 的桌面可以给你一个新的视角来看待你与桌面的互动,即使你不会永远保持这种布局,它可以帮助你发现你可能没有想到要寻找的选项。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/2/make-kde-look-like-gnome
|
||||
|
||||
作者:[Seth Kenlon][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/seth
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/computer_browser_web_desktop.png?itok=Bw8ykZMA (Digital images of a computer desktop)
|
||||
[2]: https://opensource.com/sites/default/files/kde-decoration-remove.jpg (Removing buttons)
|
||||
[3]: https://opensource.com/sites/default/files/kde-panel-edit.jpg (Editing the panel)
|
||||
[4]: https://creativecommons.org/licenses/by-sa/4.0/
|
||||
[5]: https://opensource.com/sites/default/files/kde-like-gnome_0.jpg (GNOME layout)
|
||||
[6]: https://opensource.com/sites/default/files/kde-application-dashboard_0.jpg (Application dashboard)
|
@ -0,0 +1,191 @@
|
||||
[#]: subject: "5 new sudo features sysadmins need to know in 2022"
|
||||
[#]: via: "https://opensource.com/article/22/2/new-sudo-features-2022"
|
||||
[#]: author: "Peter Czanik https://opensource.com/users/czanik"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "wxy"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14301-1.html"
|
||||
|
||||
2022 年 5 个新 sudo 功能
|
||||
======
|
||||
|
||||
> 最近的 sudo 版本增加了新的功能,使你能够观察和控制以前隐藏的问题。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202202/24/124219ye7iqvqkvm7lla5a.jpg)
|
||||
|
||||
当你想授予你的一些用户管理权限,同时控制和检查他们在你的系统上做什么时,你会使用 `sudo`。然而,即使是 `sudo`,也有相当多不可控的地方,想想给予 shell 权限的情况就知道了。最近的 `sudo` 版本增加了一些功能,可以让你看到这些问题,甚至控制它们。例如,你可以启用更详细、更容易处理的日志信息,并记录 shell 会话中执行的每个命令。
|
||||
|
||||
这些功能中有些是全新的。有些是出现在 1.9.0 甚至更早的版本中的功能。例如,`sudo` 可以记录终端上发生的一切,即使是在 1.8 版本。然而,系统将这些记录保存在本地,它们很容易被删除,特别是那些记录最有用的地方:Shell 会话。1.9.0 版本增加了会话记录集中收集,因此记录不能被本地用户删除,最近的版本还增加了中继功能,使收集功能更加强大。
|
||||
|
||||
如果你只知道 `sudo` 的基础知识,或者以前只使用过 1.8 版本,我建议你阅读我以前的 [文章][2]。
|
||||
|
||||
### 1、JSON 格式的日志记录
|
||||
|
||||
我想介绍的第一个新功能是 JSON 格式的日志记录。我是一个日志狂热者(12 年前我就开始在 `syslog-ng` 项目上工作),而这个功能是我在这里发表文章后引入的第一个功能。启用后,`sudo` 记录了更多的信息,并且以一种更容易解析的方式进行。
|
||||
|
||||
传统的 syslog 信息很短,只包含最小的必要信息量。这是由于旧的 `syslog` 实现的限制。超过 1k 大小的信息被丢弃或截断。
|
||||
|
||||
```
|
||||
Jan 28 13:56:27 localhost.localdomain sudo[10419]: czanik : TTY=pts/0 ; PWD=/home/czanik ; USER=root ; COMMAND=/bin/bash
|
||||
```
|
||||
|
||||
最近的 `syslog` 实现可以处理更大的信息量。`syslog-ng` 默认接受 64k 大小的日志信息(当然,它可以更小或更大,取决于实际配置)。
|
||||
|
||||
同样的事件,如果以 JSON 格式记录,就会包含更多的信息。更多并不意味着更难处理。JSON 格式的信息更容易被许多日志管理软件应用解析。下面是一个例子:
|
||||
|
||||
```
|
||||
Jan 28 13:58:20 localhost.localdomain sudo[10518]: @cee:{"sudo":{"accept":{"uuid":"616bc9efcf-b239-469d-60ee-deb5af8ce6","server_time":{"seconds":1643374700,"nanoseconds":222446715,"iso8601":"20220128125820Z","localtime":"Jan 28 13:58:20"},"submit_time":{"seconds":1643374700,"nanoseconds":209935349,"iso8601":"20220128125820Z","localtime":"Jan 28 13:58:20"},"submituser":"czanik","command":"/bin/bash","runuser":"root","runcwd":"/home/czanik","ttyname":"/dev/pts/0","submithost":"localhost.localdomain","submitcwd":"/home/czanik","runuid":0,"columns":118,"lines":60,"runargv":["/bin/bash"],"runenv":["LANG=en_US.UTF-8","HOSTNAME=localhost.localdomain","SHELL=/bin/bash","TERM=xterm-256color","PATH=/home/czanik/.local/bin:/home/czanik/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin","MAIL=/var/mail/root","LOGNAME=root","USER=root","HOME=/root","SUDO_COMMAND=/bin/bash","SUDO_USER=czanik","SUDO_UID=1000","SUDO_GID=1000"]}}}
|
||||
```
|
||||
|
||||
你可以在 `sudoers` 文件中启用 JSON 格式的日志信息:
|
||||
|
||||
```
|
||||
Defaults log_format=json
|
||||
```
|
||||
|
||||
你可以从我的 [syslog-ng][3] 博客中了解更多关于如何从 `sudo` 中使用 JSON 格式的日志信息。
|
||||
|
||||
### 2、使用 sudo_logsrvd 集中收集日志
|
||||
|
||||
1.9.4 中另一个与日志相关的功能是使用 `sudo_logsrvd` 收集所有 `sudo` 日志信息(包括失败的)。以前,系统只在 `sudo_logsrvd` 实际进行记录时记录成功的会话。最后仍然默认通过 `syslog` 进行记录。
|
||||
|
||||
为什么这很重要?首先,你可以在一个地方收集任何与 `sudo` 有关的东西。无论是会话记录还是所有相应的日志信息。其次,它还可以保证正确记录所有与 `sudo` 有关的事件,因为如果 `sudo_logsrvd` 无法访问,`sudo` 可以拒绝执行命令。
|
||||
|
||||
你可以在 `sudoers` 文件中通过以下设置启用 `sudo_logsrvd` 日志记录(当然要替换 IP 地址):
|
||||
|
||||
```
|
||||
Defaults log_servers=172.16.167.150
|
||||
```
|
||||
|
||||
如果你想要 JSON 格式的日志信息,你需要在 `sudo_logsrvd` 配置的 `[eventlog]` 部分进行如下设置:
|
||||
|
||||
```
|
||||
log_format = json
|
||||
```
|
||||
|
||||
否则,`sudo_logsrvd` 使用传统的 `sudo` 日志格式,并作了简单的修改。它还包括日志来源的主机的信息:
|
||||
|
||||
```
|
||||
Nov 18 12:40:16 centos8splunk.localdomain sudo[21028]: czanik : 3 incorrect password attempts ; HOST=centos7sudo.localdomain ; TTY=pts/0 ; PWD=/home/czanik ; USER=root ; COMMAND=/bin/bash
|
||||
Nov 18 12:40:23 centos8splunk.localdomain sudo[21028]: czanik : HOST=centos7sudo.localdomain ; TTY=pts/0 ; PWD=/home/czanik ; USER=root ; TSID=00000A ; COMMAND=/bin/bash
|
||||
Nov 18 12:40:30 centos8splunk.localdomain sudo[21028]: czanik : command rejected by I/O plugin ; HOST=centos7sudo.localdomain ; TTY=pts/0 ; PWD=/home/czanik ; USER=root ; COMMAND=/bin/bash
|
||||
```
|
||||
|
||||
### 3、中继
|
||||
|
||||
当最初引入 `sudo_logsrvd`(1.9.0 版)进行会话记录集中收集时,客户端只能直接发送记录。1.9.7 版本引入了中继的概念。有了中继,你可以不直接发送记录,而是将记录发送到多级中间主机,这些中间主机构成你的网络。
|
||||
|
||||
为什么这很重要?首先,中继使收集会话记录成为可能,即使集中主机由于网络问题或维护而不可用。默认情况下,`sudo` 在无法发送记录时拒绝运行,所以中继可以确保你可以全天候使用 `sudo`。
|
||||
|
||||
其次,它还允许你对网络有更严格的控制。你不需要为所有的主机向中心的 `sudo_logsrvd` 开放防火墙,而只需要允许你的中继通过。
|
||||
|
||||
最后,它允许你从没有直接互联网接入的网络中收集会话记录,比如 AWS 私有网络,你可以在网关主机上以中继模式安装 `sudo_logsrvd`。
|
||||
|
||||
当你使用中继时,`sudo` 客户端和中心的 `sudo_logsrvd` 的配置保持不变。在中继主机上,在 `sudo_logsrvd.conf` 的 `[relay]` 部分添加以下一行:
|
||||
|
||||
```
|
||||
relay_host = 172.16.167.161
|
||||
```
|
||||
|
||||
如果知道通往中心服务器的网络连接有问题,你可以配置中继,在转发记录之前储存它:
|
||||
|
||||
```
|
||||
store_first = true
|
||||
```
|
||||
|
||||
### 4、记录子命令
|
||||
|
||||
你是否曾经想知道在通过 `sudo` 启动的 shell 会话中发生了什么?是的,会话记录是存在的,但是为了看几个命令的执行情况而看几个小时的记录是很无聊的,也是对时间的巨大浪费。幸运的是,1.9.8 版本引入了子命令日志。现在,只需定期检查你的日志信息,并在发生可疑情况时才观看记录。
|
||||
|
||||
你甚至不需要一个允许 shell 访问的规则,只需要访问一个编辑器就可以访问 shell。大多数编辑器可以运行外部命令。我最喜欢的编辑器是 JOE,这是我通过 `sudo` 启动它时可以看到的情况:
|
||||
|
||||
```
|
||||
Aug 30 13:03:00 czplaptop sudo[10150]: czanik : TTY=pts/1 ; PWD=/home/czanik ; USER=root ; COMMAND=/usr/bin/joe
|
||||
```
|
||||
|
||||
不用吃惊,就在一个编辑器里,我生成一个 shell 并从该 shell 中删除一些文件和分区。现在让我们看看当你启用对子命令记录时会发生什么:
|
||||
|
||||
```
|
||||
Aug 30 13:13:14 czanik : TTY=pts/1 ; PWD=/home/czanik ; USER=root ; COMMAND=/usr/bin/joe
|
||||
Aug 30 13:13:37 czanik : TTY=pts/1 ; PWD=/home/czanik ; USER=root ; COMMAND=/bin/sh -c /bin/bash
|
||||
Aug 30 13:13:37 czanik : TTY=pts/1 ; PWD=/home/czanik ; USER=root ; COMMAND=/bin/bash
|
||||
Aug 30 13:13:37 czanik : TTY=pts/1 ; PWD=/home/czanik ; USER=root ; COMMAND=/usr/bin/readlink /proc/10889/exe
|
||||
[...]
|
||||
Aug 30 13:13:37 czanik : TTY=pts/1 ; PWD=/home/czanik ; USER=root ; COMMAND=/usr/bin/sed -r s@/*:|([^\\\\]):@\1\n@g;H;x;s@/\n@\n@
|
||||
Aug 30 13:13:37 czanik : TTY=pts/1 ; PWD=/home/czanik ; USER=root ; COMMAND=/usr/bin/tty
|
||||
Aug 30 13:13:42 czanik : TTY=pts/1 ; PWD=/home/czanik ; USER=root ; COMMAND=/usr/bin/id
|
||||
Aug 30 13:13:56 czanik : TTY=pts/1 ; PWD=/home/czanik ; USER=root ; COMMAND=/usr/bin/ls -A -N --color=none -T 0 /usr/share/syslog-ng/include/scl/
|
||||
```
|
||||
|
||||
我省略了几十行以节省一些空间,但你仍然可以看到我启动了一个 shell,`bash_profile` 执行的命令也可以在日志中看到。
|
||||
|
||||
你可以在 `sudoers` 文件中使用以下设置来启用子命令日志:
|
||||
|
||||
```
|
||||
`Defaults log_subcmds`
|
||||
```
|
||||
|
||||
在传统的 `sudo` 日志中,你可以从 `sudo` 进程 ID 看到这些日志正是来自同一个 `sudo`会话。如果你打开 JSON 格式的日志,如前面所示,`sudo` 在日志中记录了更多的信息,使之更容易进行分析。
|
||||
|
||||
### 5、拦截子命令
|
||||
|
||||
记录子命令可以消除 `sudo` 的大部分隐患,但在有些情况下,你不只是想观察正在发生的事情,还想控制事件的流程。例如,你需要给一个用户提供 shell 权限,但仍想阻止他们运行一个特定的命令。在这种情况下,拦截是理想的选择。当然,也有一些限制,比如你不能限制 shell 的内置命令。
|
||||
|
||||
比方说,`who` 命令很危险。你可以分两步启用拦截。第一个步骤是启用它,第二个步骤是配置它。在这种情况下,我的用户不被允许运行 `who`:
|
||||
|
||||
```
|
||||
Defaults intercept
|
||||
czanik ALL = (ALL) ALL, !/usr/bin/who
|
||||
```
|
||||
|
||||
当我通过`sudo` 启动一个 root shell 会话并尝试运行 `who` 时,会发生以下情况:
|
||||
|
||||
```
|
||||
$ sudo -s
|
||||
# who
|
||||
Sorry, user czanik is not allowed to execute '/usr/bin/who' as root on czplaptop.
|
||||
bash: /usr/bin/who: Permission denied
|
||||
```
|
||||
|
||||
你可以很容易地完全禁用运行 shell:
|
||||
|
||||
```
|
||||
Defaults intercept
|
||||
Cmnd_Alias SHELLS=/usr/bin/bash, /usr/bin/sh, /usr/bin/csh
|
||||
czanik ALL = (ALL) ALL, !SHELLS
|
||||
```
|
||||
|
||||
这意味着你不能通过 `sudo` 启动 shell 会话。不仅如此,你也不能从编辑器中执行外部命令。当我试图从 `vi` 中启动 `ls` 命令时,就会出现这种情况:
|
||||
|
||||
```
|
||||
$ sudo vi /etc/issue
|
||||
Sorry, user czanik is not allowed to execute '/bin/bash -c /bin/ls' as root on czplaptop.
|
||||
Cannot execute shell /bin/bash
|
||||
Press ENTER or type command to continue
|
||||
```
|
||||
|
||||
### 接下来是什么?
|
||||
|
||||
我希望读了我的文章后,自己尝试一下这些新功能。你可以通过你的软件包管理器在许多 Linux 发行版和 UNIX 变种上安装最新的 `sudo`,或者使用 [Sudo 网站][4] 上的二进制安装程序。
|
||||
|
||||
这篇文章只是为你提供了一个新的可能性的概述。如果你想了解更多关于这些功能的信息,请访问网站,那里有手册页面,也有 [Sudo 博客][5]。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/2/new-sudo-features-2022
|
||||
|
||||
作者:[Peter Czanik][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[wxy](https://github.com/wxy)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/czanik
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/tools_sysadmin_cloud.png?itok=sUciG0Cn (Tools for the sysadmin)
|
||||
[2]: https://linux.cn/article-12865-1.html
|
||||
[3]: https://www.syslog-ng.com/community/b/blog/posts/working-with-json-logs-from-sudo-in-syslog-ng
|
||||
[4]: https://www.sudo.ws/getting/packages
|
||||
[5]: https://www.sudo.ws/posts
|
@ -0,0 +1,136 @@
|
||||
[#]: subject: "7 Things I Want to See in Ubuntu 22.04 LTS [I Know I Won’t Get it]"
|
||||
[#]: via: "https://news.itsfoss.com/things-i-want-ubuntu-22-04-lts/"
|
||||
[#]: author: "Jacob Crume https://news.itsfoss.com/author/jacob/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "wxy"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14304-1.html"
|
||||
|
||||
7 个我希望在 Ubuntu 22.04 LTS 看到的变化
|
||||
======
|
||||
|
||||
> Ubuntu 22.04 即将面世。但是,你对它的发布有什么期望?在这里,我分享一些我希望看到的东西。
|
||||
|
||||
![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/ubuntu-22-04-things-i-want.jpg?w=1200&ssl=1)
|
||||
|
||||
随着 Ubuntu 22.04 LTS 的到来,我们都在急切地等待着体验 [Ubuntu 22.04 引入的功能][1]。
|
||||
|
||||
在没有对 Ubuntu 22.04 进行全面亲身体验的情况下,我不能确定它是否令人印象深刻。但是,我确实对我想在 Ubuntu 22.04 中看到的东西有一些想法。
|
||||
|
||||
现在提出一些修改要求可能有点太晚了,但我还是希望能有最好的结果。
|
||||
|
||||
一些重点包括:
|
||||
|
||||
### 1、在所有的应用程序中保持一致的主题形象
|
||||
|
||||
![][2]
|
||||
|
||||
任何试图在 Ubuntu 上安装 KDE 应用的人都会知道,主题不一致的情况比比皆是。更糟糕的是,Libadwaita 的加入只会让更多的应用程序显得格格不入。
|
||||
|
||||
为了解决这个问题,我认为需要一个替代解决方案组合。
|
||||
|
||||
首先,默认采用 Ubuntu 的 Yaru 主题的定制 Libadwaita 将使几乎所有为 Gnome 和 GTK 构建的应用程序再次保持一致。然而,这仍然不能解决 Qt/KDE 应用程序的问题。
|
||||
|
||||
对于这些,需要一个类似于 [Kvantum][3] 的解决方案。尽管 Kvantum 有点“难”,但我真的相信,一个有 Canonical(Ubuntu 的母公司)全力支持的解决方案能够克服 Kvantum 所面临的所有挑战。
|
||||
|
||||
Ubuntu 的外观和感觉是其决定性的特征之一,关键是要在每个应用程序中保持这种外观,以确保其视觉吸引力。
|
||||
|
||||
### 2、使用 GNOME 40 中引入的水平停靠区
|
||||
|
||||
![][3a]
|
||||
|
||||
尽管有些激进,[Gnome 40][4] 是 Gnome 向未来的一次飞跃,有几个令人兴奋的功能。然而,这些创新的功能中有许多并没有进入 Ubuntu 22.10。
|
||||
|
||||
其中最值得注意的是水平停靠区。对我来说,我发现它极大地提高了我的工作效率,因为我不必再像以前那样把鼠标移到屏幕的左边。我相信很多 Ubuntu 用户同意我的观点,但是 Canonical 坚持认为左边的位置是最好的。
|
||||
|
||||
我不是说他们应该把停靠区移到底部,这毕竟是 Ubuntu 的一个决定性特征,只是给用户一个这样的选择而已。Ubuntu 在设置程序中已经有一个自定义“外观”部分,所以我认为在那里增加一个简单的切换开关不会太难。
|
||||
|
||||
### 3、找回混合主题
|
||||
|
||||
![][5]
|
||||
|
||||
升级到 Ubuntu 21.10 后,我很失望地发现 [混合主题选项消失了][6]。虽然这只是个小问题,但我确实发现自己很怀念这个选项,并不断地想办法把它找回来。
|
||||
|
||||
我认为,让用户有能力轻松地定制他们的桌面是很重要的,把这个选项带回来对改善这个问题有很大的帮助。
|
||||
|
||||
我理解他们想摆脱它是因为 Ubuntu 和 GNOME 默认主题颜色的冲突。但是,我喜欢它原来的样子。
|
||||
|
||||
### 4、改造后的软件中心
|
||||
|
||||
![][7]
|
||||
|
||||
随着 Canonical 不断推动人们使用 snap 应用程序(一种与所有发行版兼容的通用打包格式),创建一个新的软件中心将是有意义的。
|
||||
|
||||
虽然 Snap 商店已经存在,但它只是 Gnome 软件的一个复刻,而它以其速度慢和 bug 多而出名。
|
||||
|
||||
随着 [Gnome 41][8] 的发布,这一点在一定程度上得到了缓解,尽管这些改进不太可能被包含在 Ubuntu 22.04 中。
|
||||
|
||||
如果有一个新的软件中心诞生,或者现有的软件中心得到重大改造,我将会很高兴。
|
||||
|
||||
如果 Ubuntu 要推出一个新的应用程序商店,它可能会使用 Flutter 来构建,就像他们的新安装程序。虽然我个人并不喜欢 Ubuntu 开始转向 Flutter 的决定,但这将有助于确保其所有变体的一致性。
|
||||
|
||||
### 5、改进的自定义选项
|
||||
|
||||
有些人喜欢保持简单,而有些人则喜欢自定义选项来改变外观/感觉。
|
||||
|
||||
Ubuntu 22.04 LTS 不需要引入任何疯狂的东西,但是简单地在默认情况下增加一些额外的控制,你可以在 [GNOME 调整][9] 中找到,应该可以做到这一点。
|
||||
|
||||
目前,外观调整是相当有限的,我们可以使用更多的选项。
|
||||
|
||||
### 6、让 Snap 应用程序少一些
|
||||
|
||||
![][9a]
|
||||
|
||||
我知道,我知道。Snap 应用程序无处不在,而且它们与多个发行版兼容。但是,它们的速度也更慢,而且只能从专有的 Snap 商店安装。
|
||||
|
||||
当然,你可以选择 Flatpak 和预建的二进制文件。但是,Snap 的专有方式仍然是许多用户不喜欢的。
|
||||
|
||||
另一方面,Ubuntu 的原生 [Apt 软件包管理器][10] 速度更快,而且有更多的应用程序可用。这导致了用户体验的明显改善,尽管这种改善在各发行版中并不连续。
|
||||
|
||||
不幸的是,Snap 实际上是由 Ubuntu 背后的同一个团队开发的,所以删除它是相当不可能的。
|
||||
|
||||
### 7、卸载应用程序的统一方式
|
||||
|
||||
Ubuntu 在为终端用户提供便利方面有着很好的声誉。
|
||||
|
||||
为了对抗 Linux 软件包的碎片化,Ubuntu 能否引入一种轻松卸载应用程序的方法,无论是 Flatpak/Deb/Snap?
|
||||
|
||||
考虑到外面有各种各样的软件包,现在是时候让我们有一个处理所有软件包的单一解决方案了。
|
||||
|
||||
![][10a]
|
||||
|
||||
在 Ubuntu 22.04 LTS 中不太可能看到它的解决方案,但我希望在下一个版本中能做到!
|
||||
|
||||
### 总结
|
||||
|
||||
很明显,你可能不会看到所有这些期望的事情在下一个版本中发生。然而,即使 Ubuntu 22.04 LTS 在这个方向上做了一些努力,我们也有希望在未来的版本中看到它们。
|
||||
|
||||
你希望在 Ubuntu 22.04 中看到哪些新功能?请在下面的评论中告诉我们!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://news.itsfoss.com/things-i-want-ubuntu-22-04-lts/
|
||||
|
||||
作者:[Jacob Crume][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[wxy](https://github.com/wxy)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://news.itsfoss.com/author/jacob/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://itsfoss.com/ubuntu-22-04-release-features/
|
||||
[2]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/06/ubuntu-dark-light-theme.png?w=1200&ssl=1
|
||||
[3]: https://github.com/tsujan/Kvantum
|
||||
[3a]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/gnome-42-ft.jpg?w=1200&ssl=1
|
||||
[4]: https://news.itsfoss.com/gnome-40-release/
|
||||
[5]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/06/ubuntu-yaru-standard-theme.png?resize=1568%2C1074&ssl=1
|
||||
[6]: https://news.itsfoss.com/ubuntu-21-10-theme-change/
|
||||
[7]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/sign-in-ubuntu-software-center.png?resize=1568%2C836&ssl=1
|
||||
[8]: https://news.itsfoss.com/gnome-41-release/
|
||||
[9]: https://itsfoss.com/gnome-tweak-tool/
|
||||
[9a]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/09/firefox-snap-default.jpg?w=1200&ssl=1
|
||||
[10]: https://itsfoss.com/apt-command-guide/
|
||||
[10a]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/Remove-application-option-gnome.png?w=800&ssl=1
|
@ -0,0 +1,88 @@
|
||||
[#]: subject: "Add, switch, delete, and manage Linux users in KDE"
|
||||
[#]: via: "https://opensource.com/article/22/2/manage-linux-users-kde"
|
||||
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14322-1.html"
|
||||
|
||||
在 KDE 中添加、切换、删除和管理 Linux 用户
|
||||
======
|
||||
|
||||
> 在一台电脑上维护独立的用户是一种奢侈,也是保护你自己和你关心的人的数据安全的一个好方法。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202203/03/104151iwevek3xzcr1113u.jpg)
|
||||
|
||||
在一个家庭中共享一台电脑通常是一件很随意的事情。当你需要电脑时,你拿起它并开始使用它。这在理论上很简单,而且大部分情况下是有效的。也就是说,直到你不小心拿起公用电脑,不小心把你的服务器的正常运行时间的截图发到你伴侣的烹饪博客上。然后,就到了建立独立用户帐户的时候了。
|
||||
|
||||
从一开始,Linux 就是一个多用户系统。它的设计是把每个用户,只要他们登录,都当作一个独特的人,有一个属于他们自己的桌面,一个独特的网络浏览器配置文件,访问他们自己的文档和文件,等等。KDE Plasma 桌面做了很多工作,使得从一个帐户切换到另一个帐户很容易,但首先你必须为每个你期望使用电脑的人设置一个用户帐户。你也可以为客人设置一个特殊的帐户(我称这个帐户为 `guest`)。
|
||||
|
||||
### 在 KDE 中添加用户
|
||||
|
||||
在 Linux 上有不同的方法来添加用户。一种方法是系统管理员式的 [使用终端][2]。当你有很多用户需要添加时,这是非常有效的,所以你想把这个过程自动化或者只是减少鼠标点击的次数。
|
||||
|
||||
不过在 Plasma 桌面上,你可以用<ruby>用户<rt>Users</rt></ruby>程序来添加用户。<ruby>用户<rt>Users</rt></ruby>实际上是<ruby>系统设置<rt>System Settings</rt></ruby>中的一个控制面板,但你可以从你的应用菜单中启动它,就像它是一个独立的应用。
|
||||
|
||||
![Users in KDE System Settings][3]
|
||||
|
||||
要添加一个用户,点击窗口底部的<ruby>添加新用户<rt>Add New User</rt></ruby>按钮。
|
||||
|
||||
![Adding a user in KDE][5]
|
||||
|
||||
给新用户一个<ruby>名字<rt>Name</rt></ruby>和一个<ruby>用户名<rt>Username</rt></ruby>。这些可能是相同的,但意图是他们的名字是他们的姓名,而他们的用户名是他们用于使用的入口。例如,我的名字是 “Seth Kenlon”,而我的用户名是 `seth`。
|
||||
|
||||
将新用户指定为<ruby>标准用户<rt>Standard</rt></ruby>或<ruby>管理员<rt>Administraor</rt></ruby>。标准用户只对自己的环境有完全的控制权。他们可以 [安装 Flatpak][6] 并将数据保存到他们的主目录,但他们不能影响机器上的其他用户。这是有用户帐户的好处之一。我不会认为我允许使用我的电脑的任何人打算删除对我很重要的数据,但意外还是发生了。通过为我自己和我的伴侣创建一个单独的用户帐户,我在保护我们每个人的数据,我也在保护我们每个人,避免意外地移动一个文件或误放对另一个人很重要的数据。
|
||||
|
||||
管理员可以进行全系统的更改。我通常在我的电脑上为自己保留这个角色,我也希望我的伴侣在她自己的电脑上为自己保留这个角色。然而,在工作中,这个角色属于 IT 部门。
|
||||
|
||||
为用户创建一个<ruby>密码<rt>Password</rt></ruby>,并重复<ruby>确认<rt>Confirm</rt></ruby>。登录后,新用户可以改变他们的密码。
|
||||
|
||||
要完成用户创建,请点击<ruby>创建<rt>Create</rt></ruby>按钮。
|
||||
|
||||
### 切换用户
|
||||
|
||||
在桌面有两种不同的方式来切换用户。你可以注销,然后让另一个用户登录,或者你可以从应用菜单的<ruby>电源/会话<rt>Power / Sessions</rt></ruby>子菜单中选择<ruby>切换用户<rt>Switch user</rt></ruby>。
|
||||
|
||||
![Switching users in KDE][7]
|
||||
|
||||
当一个新用户登录时,你的当前桌面会被“冻结”或暂停,而另一个用户的新桌面会被调出来。你所有的窗口都保持打开。你甚至可以在游戏中切换用户(如果你正在战斗中,你应该先暂停一下),当你切换回来时,你可以从你离开的地方继续。更好的是,你的所有进程也会继续运行。所以你可以在渲染视频或编译代码时切换用户,当你切换回来时,你的视频已经完成了渲染,或者你的代码已经完成了编译(只要有足够的时间)。
|
||||
|
||||
![Login][8]
|
||||
|
||||
### 删除用户
|
||||
|
||||
当我有客人时,我经常在他们的逗留期间创建一个客人帐户,当他们离开后,我就删除这个帐户。
|
||||
|
||||
你可以通过删除一个用户的用户帐户来从你的电脑中删除该用户。这将删除他们的所有数据,所以要确保你要删除的用户已经把他们需要的东西从机器上迁移掉了!
|
||||
|
||||
<ruby>删除用户<rt>Delete User</rt></ruby>按钮位于<ruby>用户<rt>Users</rt></ruby>控制面板中的每个用户帐户下,也就是你最初创建用户的地方。
|
||||
|
||||
![Deleting a user][9]
|
||||
|
||||
### Linux 用户管理
|
||||
|
||||
在计算机上维护独立的用户是一种奢侈,也是保护你自己的数据和你关心的人的数据安全的好方法。它允许每个用户都是独一无二的,并使桌面成为他们自己的。在 Linux 中,这很容易,而且没什么影响,因此可以为朋友、房客和家人创建用户。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/2/manage-linux-users-kde
|
||||
|
||||
作者:[Seth Kenlon][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/seth
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/connection_people_team_collaboration.png?itok=0_vQT8xV (people in different locations who are part of the same team)
|
||||
[2]: https://www.redhat.com/sysadmin/linux-commands-manage-users
|
||||
[3]: https://opensource.com/sites/default/files/kde-users.jpg (Users in KDE System Settings)
|
||||
[4]: https://creativecommons.org/licenses/by-sa/4.0/
|
||||
[5]: https://opensource.com/sites/default/files/kde-users-add.jpg (Adding a user in KDE)
|
||||
[6]: https://opensource.com/article/21/11/install-flatpak-linux
|
||||
[7]: https://opensource.com/sites/default/files/kde-users-switch.jpg (Switching users in KDE)
|
||||
[8]: https://opensource.com/sites/default/files/kde-users-login.jpg (Login)
|
||||
[9]: https://opensource.com/sites/default/files/kde-users-delete.jpg (Deleting a user)
|
@ -0,0 +1,101 @@
|
||||
[#]: subject: "Listen to your favorite music on Linux with Juk"
|
||||
[#]: via: "https://opensource.com/article/22/2/listen-music-linux-juk-kde"
|
||||
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14329-1.html"
|
||||
|
||||
用 Juk 在 Linux 上听你喜欢的音乐
|
||||
======
|
||||
|
||||
> Juk 是 Linux 上的 KDE Plasma 桌面的默认开源音乐播放器。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202203/05/180154hu1nse2p2crv5q1r.jpg)
|
||||
|
||||
KDE 项目不只是提供了一个著名的桌面,它还产生了很多软件,从 [视频编辑][2]、[摄影][3] 和 [插图][4] 工具,到图形计算器、电子邮件和办公工作。这些都是生产力工具,但 KDE 也适合于放松。它有游戏和媒体播放器,而我使用的音乐播放器是 [Juk][5]。
|
||||
|
||||
### 在 Linux 上安装 Juk
|
||||
|
||||
只要你的 Linux 发行版提供 KDE 软件包,你就可以用你的包管理器安装 Juk。
|
||||
|
||||
在 Fedora、Mageia 和类似发行版上:
|
||||
|
||||
```
|
||||
$ sudo dnf install juk
|
||||
```
|
||||
|
||||
在 Elementary、Linux Mint 和其他基于 Debian 的发行版上:
|
||||
|
||||
```
|
||||
$ sudo apt install juk
|
||||
```
|
||||
|
||||
### 使用 Juk
|
||||
|
||||
当你第一次启动 Juk 时,你会被问到你想用什么目录作为你的音乐集的来源。选择你希望 Juk 寻找音乐的文件夹,并可选择排除你希望 Juk 忽略的任何子目录。
|
||||
|
||||
![Adding music to Juk][6]
|
||||
|
||||
取决于你有多少音乐,Juk 可能需要一些时间来解析文件系统和元数据。当它完成后,通常的 Juk 窗口就会出现,你所有的音乐都在一个叫做“<ruby>收藏列表<rt>Collection List</rt></ruby>”的中央收藏列表中。
|
||||
|
||||
![Juk music player][8]
|
||||
|
||||
在顶部的搜索栏中,你可以在任何领域搜索任何字符串。双击歌曲,开始播放。
|
||||
|
||||
Juk 默认为连续播放,这意味着在它播放完你的选择后,它会继续播放收藏列表中的下一首歌曲,即使你已经将你的列表过滤到只有一首歌曲。这使音乐总是会不断播放,就像一个真正的点唱机。
|
||||
|
||||
就我个人而言,我更喜欢听完整的专辑,中间有足够的休息时间去厨房喝咖啡,所以我使用播放列表。
|
||||
|
||||
### Juk 中的播放列表
|
||||
|
||||
Juk 中的播放列表可以包含你收藏列表中的任何内容。Juk 会在播放列表中播放一次,然后停止。
|
||||
|
||||
要创建一个播放列表,在左边的播放列表栏中点击右键,在出现的上下文菜单中选择 “<ruby>新建<rt>New</rt></ruby>”。你可以创建一个空的播放列表,或者从你硬盘上的特定文件夹中创建一个播放列表。
|
||||
|
||||
![Creating a new playlist][9]
|
||||
|
||||
### 自动播放列表
|
||||
|
||||
你还可以创建一个与特定搜索绑定的特殊播放列表,这对那些你经常购买并添加到你的收藏中的艺术家很有用。有了搜索播放列表,他们的新音乐就会被添加到他们的播放列表中,而无需你的手动干预。
|
||||
|
||||
### 打标签
|
||||
|
||||
让我们面对现实吧,音乐播放器是一堆一堆的出现,而且它们大多都做同样的事情。然而,Juk 增加了一个重要的功能。它让你有能力修改元数据标签。
|
||||
|
||||
![Metadata editor][10]
|
||||
|
||||
很多音乐的标签是不一致的、不完整的,或者根本就没有,所以当你发现它们出现在播放队列中时,能够纠正它们是一种奢侈。
|
||||
|
||||
它还有一个标签猜测器的功能,它试图解析文件名,并对歌曲进行相应的标记。
|
||||
|
||||
### 明显的选择
|
||||
|
||||
当你在 KDE 上寻找一个音乐播放器时,Juk 是一个简单而明显的选择。当然,还有很多其他非常好的选择,正如我们的常驻发烧友 [Chris Hermansen][11] 在他的 [3 个开源音乐播放器][12] 文章中详细介绍的那样,但有时你只是想使用你最容易想到的东西。Juk 既能直观地使用,又能出色地完成它的任务。它是多么幸运啊,成为 KDE Plasma 桌面上的默认播放器。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/2/listen-music-linux-juk-kde
|
||||
|
||||
作者:[Seth Kenlon][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/seth
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/c-d-x-pdx_a_82obo-unsplash.jpg?itok=2txWDP31 (Headphones on a yellow backdrop)
|
||||
[2]: https://opensource.com/article/21/12/kdenlive-linux-creative-app
|
||||
[3]: https://opensource.com/life/16/5/how-use-digikam-photo-management
|
||||
[4]: https://opensource.com/article/21/12/krita-digital-paint
|
||||
[5]: https://juk.kde.org/
|
||||
[6]: https://opensource.com/sites/default/files/juk-import.jpg (Adding music to Juk)
|
||||
[7]: https://creativecommons.org/licenses/by-sa/4.0/
|
||||
[8]: https://opensource.com/sites/default/files/juk-player.jpg (Juk music player)
|
||||
[9]: https://opensource.com/sites/default/files/juk-playlist-new.jpg (Creating a new playlist)
|
||||
[10]: https://opensource.com/sites/default/files/juk-tagger.png (Metadata editor)
|
||||
[11]: https://opensource.com/users/clhermansen
|
||||
[12]: https://opensource.com/article/17/1/open-source-music-players
|
@ -0,0 +1,281 @@
|
||||
[#]: subject: "KDE vs GNOME: What’s the Ultimate Linux Desktop Choice?"
|
||||
[#]: via: "https://itsfoss.com/kde-vs-gnome/"
|
||||
[#]: author: "Ankush Das https://itsfoss.com/author/ankush/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14320-1.html"
|
||||
|
||||
KDE 与 GNOME:什么是 Linux 桌面的终极选择?
|
||||
======
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202203/02/160920u0pqhbfqdob7kt22.jpg)
|
||||
|
||||
说到 Linux,<ruby>桌面环境<rt>desktop environment</rt></ruby>(DE)是个大问题。
|
||||
|
||||
桌面环境构成了图形用户界面(GUI),以及你在 Linux 发行版上得到的一组应用。
|
||||
|
||||
你可以通过我们的 [解释什么是桌面环境的文章][1] 了解。
|
||||
|
||||
选择一个好的桌面环境可以帮助你提高生产力、工作流程、易用性和整体体验。
|
||||
|
||||
在 [最佳桌面环境][2] 中,KDE Plasma 和 GNOME 特别受欢迎。在这里,我打算强调其中的关键区别,以帮助你做出决定。
|
||||
|
||||
> 注意:KDE 是整个社区的人在其名下开发的各种项目。其中桌面环境的名字是 Plasma。在这里,我们将 Plasma 桌面与 GNOME 进行比较。然而,为了简单起见,我们倾向于使用 “KDE” 而不是 “Plasma”。
|
||||
|
||||
### 用户界面:功能与外观
|
||||
|
||||
用户界面通常涉及到布局类型、图标、主题、小工具和 GUI 的其他组件。
|
||||
|
||||
#### KDE
|
||||
|
||||
KDE 的目标是提供一个传统的桌面布局,让大多数 Windows 用户感到舒适。
|
||||
|
||||
![][3]
|
||||
|
||||
不过,不要被这一点所迷惑。它的外观很简单,但却专注于更多的功能。
|
||||
|
||||
事实上,Windows 从 KDE 中获得了灵感,对其用户界面进行了一些改进,比如通过滚动任务栏中的音量图标来调整音量的能力。
|
||||
|
||||
![][4]
|
||||
|
||||
而且,KDE 以其一致的外观和感觉而闻名,即使多年来有许多改进。
|
||||
|
||||
#### GNOME
|
||||
|
||||
另一方面,GNOME 提供了一种独特的桌面体验。如果你正在寻找一个不同的、现代的用户界面设计,GNOME 应该很适合你。
|
||||
|
||||
其图标/主题/壁纸可能看起来更符合现代标准。偏好有所侧重,但在我看来,GNOME 看起来更有吸引力。
|
||||
|
||||
![][5]
|
||||
|
||||
然而,如果你已经适应了传统的类似 Windows 的布局,调整工作流程可能需要一段时间。
|
||||
|
||||
这里没有开始/应用/菜单按钮。你必须点击活动概览来访问你的工作空间(或虚拟桌面),并从同一个地方访问应用菜单。
|
||||
|
||||
对一些人来说,没有任务栏可能看起来更干净,但这取决于你的喜好。
|
||||
|
||||
请注意,与 KDE 相比,UI 可能没有那么多功能,也没那么丰富。例如,系统托盘中的部件提供了比 GNOME 上的小程序更多的选项。
|
||||
|
||||
![][6]
|
||||
|
||||
因此,在 UI 方面,KDE 与 GNOME 并没有明显的赢家,而是取决于你对功能或现代外观的要求。
|
||||
|
||||
### 应用生态
|
||||
|
||||
#### KDE
|
||||
|
||||
使用 KDE,你可以获得 [无数的实用程序][7]。
|
||||
|
||||
你可能会被 KDE 提供给 KDE 上使用的应用所淹没。
|
||||
|
||||
![][8]
|
||||
|
||||
不止如此,整个 KDE 社区都一直忙于为这个武器库添加新的应用和工具。
|
||||
|
||||
它们中许多在现有的应用中脱颖而出,如 Krita、Kdenlive、Kate 编辑器等等。
|
||||
|
||||
#### GNOME
|
||||
|
||||
GNOME 默认也具有 [众多的应用][9]。虽然对于大多数用户来说,这可能是一个足够的列表,但与 KDE 相比,它在目录上有所不足。
|
||||
|
||||
![][10]
|
||||
|
||||
我发现自己并没有使用过很多来自 GNOME 的应用。
|
||||
|
||||
而且,值得注意的是,与 GNOME 的默认应用相比,KDE 桌面环境自带的应用得到了更快的改进。
|
||||
|
||||
这是与 GNOME 应用程序相比的 KDE 的开发更新频度,不过这只是个人观察,这可能会随着时间而改变。
|
||||
|
||||
### 什么是最好的定制?
|
||||
|
||||
#### KDE
|
||||
|
||||
如果你想改造和控制用户体验,KDE 是一个很好的选择。
|
||||
|
||||
不要光听我说,你可以按照我们的 [KDE 定制指南][11] 了解可用选项。
|
||||
|
||||
![][12]
|
||||
|
||||
不仅仅是定制的能力,你还可以得到很多开箱即用的控制,用于改变主题、颜色、工作区效果、窗口管理等等,而不需要任何特定的应用程序/扩展。
|
||||
|
||||
对于一些人来说,如果你想坚持使用原版的体验,这么多的选项也不会产生什么影响,不用担心。
|
||||
|
||||
#### GNOME
|
||||
|
||||
至于 GNOME,你没有那么多开箱即用的控制。相反,你必须得依靠 GNOME “优化”或一些扩展来改变。但是,是的,你可以在很大程度上自定义体验。
|
||||
|
||||
![][13]
|
||||
|
||||
另外,请注意,在写这篇文章的时候,[GNOME 42][14] 还没有成为稳定版本。所以,你可以期待一个系统级的深色模式的实现,以及一些外观/感觉上的改进。
|
||||
|
||||
当然,这不是一个公平的比较,考虑到两者都提供不同的 GUI 元素和布局。然而,对于想要更多控制和定制选项的用户来说,KDE 会被选择。
|
||||
|
||||
GNOME 适合于不想要很多选项的用户。如果你喜欢 GNOME 提供的东西,并且愿意用额外的努力来定制体验,你也可以这么做。
|
||||
|
||||
### 额外的能力:KDE 与 GNOME
|
||||
|
||||
#### GNOME
|
||||
|
||||
如前所述,GNOME 提供了给你当前的配置 [增加更多的功能的扩展功能][15]。
|
||||
|
||||
你可以前往 [GNOME 的 shell 扩展网站][16] 来探索各种选择,或者看看我们的 [最佳 GNMOE 扩展列表][17]。
|
||||
|
||||
![][18]
|
||||
|
||||
GNOME 扩展让你可以轻松地做很多事情,比如使用自动移动窗口切换器来自动化应用启动的工作区。
|
||||
|
||||
有各种各样的扩展来改善你的工作流程,使事情变得简单。
|
||||
|
||||
然而,这些扩展取决于 GNOME shell 的版本。此外,由于从一个版本到另一个版本的激进变化,GNOME 扩展可能在未来的版本中停止工作。
|
||||
|
||||
#### KDE
|
||||
|
||||
另一方面,KDE 也提供了一个充满附加组件、小工具和应用附加组件的袋子。
|
||||
|
||||
![][19]
|
||||
|
||||
不像 GNOME 从浏览器中添加扩展的那种不方便的方式(使用另一个浏览器扩展),你可以使用“发现”软件中心直接访问 KDE 的附加组件。
|
||||
|
||||
![][20]
|
||||
|
||||
所以,添加额外的功能或主题就变成了一种无缝的体验,而不需要遵循一套单独的步骤。
|
||||
|
||||
不要忘了,像 KDE Connect 这样的工具提供了额外的能力,让你把你的手机和你的电脑连接起来。
|
||||
|
||||
总的来说,你可以在两者上扩展功能,但如果你想有更多的选择,KDE 更有优势。
|
||||
|
||||
### 无障碍选项
|
||||
|
||||
#### KDE
|
||||
|
||||
虽然 KDE 在几个方面做得很好,但增强桌面无障碍的可用能力非常有限(比如没有开箱即用的屏幕阅读器)。
|
||||
|
||||
![][21]
|
||||
|
||||
有一种可能是,开发者正在用 Orca 屏幕阅读器应用来测试其功能,比如桌面的听力/视觉辅助,但在 KDE Plasma 5.24 中,它不够实用。
|
||||
|
||||
正如我们的一位读者所指出的,KDE 在安装前后都不能“说话”。所以,这对他们来说不是一个选择。
|
||||
|
||||
#### GNOME
|
||||
|
||||
然而,GNOME 做得更好,它有读屏器、视觉提醒、屏幕键盘、声音键、点击辅助等。
|
||||
|
||||
![][22]
|
||||
|
||||
所以,如果一个用户依赖无障碍选项来使用桌面,GNOME 应该是个选择。
|
||||
|
||||
### KDE 比 GNOME 更快?
|
||||
|
||||
拥有一个能在可用系统资源下有效工作的桌面环境是很重要的。如果你想进行多任务处理,而又没有超好的配置来支持的话,这一点就显得无比重要。
|
||||
|
||||
KDE 通常被认为比其他大多数桌面环境要快,因为它对资源的占用很轻。
|
||||
|
||||
然而,为了给你一个参考,我创建了两个虚拟机(Fedora 35 和 KDE Neon 用户版),在你继续尝试之前提供一些想法。
|
||||
|
||||
两个虚拟机的设置都使用类似的资源配置,分配了两个核心和 8GB 内存,下面是我们的情况:
|
||||
|
||||
![Resource usage on GNOME 41 \(Fedora 35\)][23]
|
||||
|
||||
这个资源使用情况是在开启虚拟机后,后台没有任何东西运行的情况下的截图。
|
||||
|
||||
相比之下,由 KDE 驱动的发行版 KDE Neon 被证明在后台没有运行截图程序的情况下消耗了不到 1GB 的内存。
|
||||
|
||||
![][24]
|
||||
|
||||
即使在截图程序运行的情况下,它消耗的资源也较少。
|
||||
|
||||
如果这还不能说服你,过去也有许多报告,比如 [Jason 的报告][25],提到 KDE 是比 XFCE 更轻的桌面环境。
|
||||
|
||||
### 可用的发行版:GNOME 与 KDE
|
||||
|
||||
大多数流行的发行版都将 GNOME 作为默认(或唯一)的桌面环境。Fedora、Ubuntu 和 Pop!\_OS 是流行的例子。
|
||||
|
||||
你应该能找到许多有单独的 GNOME 版本的发行版。
|
||||
|
||||
至于 KDE,你可以尝试了解一下我们的 [基于 KDE 的发行版][26] 列表,或者寻找像 Kubuntu 这样的选择。在大多数主流发行版中,你可能不会发现 KDE 是默认选择的发行版,但你应该发现几乎所有的发行版都有 KDE 的变体。
|
||||
|
||||
### 那么,你应该选择什么来定义你的桌面体验?
|
||||
|
||||
对桌面环境的选择带给了你想要的桌面体验。
|
||||
|
||||
如果你想要简单、性能和众多的选项/工具,KDE 应该是一个常青的选择。
|
||||
|
||||
如果你想要一个现代的/更干净的外观,并且不介意不同的布局(或用户体验),GNOME 可以成为一个不错的补充。
|
||||
|
||||
虽然 GNOME 可能无法给你同样多的控制,但你仍然可以用它做很多事情。Pop!\_OS 是一个例子,它将 GNOME 作为桌面环境,并在其上添加扩展/功能,使其成为一个光鲜的桌面发行版。
|
||||
|
||||
所以,你需要评估什么对你的用户体验更重要。
|
||||
|
||||
**我的看法**:我会选择 GNOME 而不是 KDE,以获得独特/完美的桌面体验。
|
||||
|
||||
你会选择什么?请在下面的评论区告诉我你的想法。
|
||||
|
||||
### 常见问题:如果你还在为做出选择而感到困惑
|
||||
|
||||
看完比较后,你可能会有一些问题,所以我想解决一些潜在的问题:
|
||||
|
||||
**1、为什么 KDE 不流行**
|
||||
|
||||
KDE 可以说是继 GNOME 之后第二受欢迎的桌面环境。然而,它并不是主流发行版和 Ubuntu、Pop!\_OS、Fedora 等流行选项的默认选择;因此,你可以看到身边都是 GNOME。
|
||||
|
||||
**2、GNOME 比 KDE 更稳定吗?**
|
||||
|
||||
这两个桌面环境都是由有经验的开发者团队建立的,并定期进行修复和改进。
|
||||
|
||||
到目前为止,GNOME 已经有多次彻底的改变。所以,从这个角度来说,KDE 可以被认为是更一致和稳定的体验。
|
||||
|
||||
**3、KDE 是否比 GNOME 更快?**
|
||||
|
||||
虽然我们已经在文章中试图解决这个问题,但应该注意的是,性能取决于你做什么和可用的系统资源。
|
||||
|
||||
对于一些用户来说,最少的资源消耗可能是一个很大的胜利。而对某些人来说,随着可用资源的增加,差异也会逐渐消失。
|
||||
|
||||
**4、KDE 比 GNOME 好吗?**
|
||||
|
||||
KDE 具有更多的应用、自定义选项和额外的功能。然而,对于那些不希望获得任何此类选项的用户来说,它可能会让人感到不知所措。
|
||||
|
||||
如果用户喜欢简洁的用户体验,提供现代的外观,GNOME 可能是一个更好的选择。
|
||||
|
||||
归根结底,这都是你的喜好,而不是一个桌面环境的优势。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/kde-vs-gnome/
|
||||
|
||||
作者:[Ankush Das][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://itsfoss.com/author/ankush/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://itsfoss.com/what-is-desktop-environment/
|
||||
[2]: https://itsfoss.com/best-linux-desktop-environments/
|
||||
[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/kde-home-2022.png?resize=800%2C466&ssl=1
|
||||
[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/kde-system-tray-area.png?resize=715%2C570&ssl=1
|
||||
[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/gnome-41-home.png?resize=800%2C409&ssl=1
|
||||
[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/gnome-ui-elements.png?resize=582%2C373&ssl=1
|
||||
[7]: https://apps.kde.org
|
||||
[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/kde-discover.png?resize=800%2C595&ssl=1
|
||||
[9]: https://apps.gnome.org/en-GB/
|
||||
[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/gnome-apps.png?resize=800%2C409&ssl=1
|
||||
[11]: https://itsfoss.com/kde-customization/
|
||||
[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/kde-appearance-custom.png?resize=800%2C564&ssl=1
|
||||
[13]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/gnome-settings-appearance-41.png?resize=800%2C573&ssl=1
|
||||
[14]: https://news.itsfoss.com/gnome-42-features/
|
||||
[15]: https://itsfoss.com/gnome-shell-extensions/
|
||||
[16]: https://extensions.gnome.org
|
||||
[17]: https://itsfoss.com/best-gnome-extensions/
|
||||
[18]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/gnome-extensions-website.png?resize=800%2C520&ssl=1
|
||||
[19]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/kde-plasma-addons.png?resize=800%2C557&ssl=1
|
||||
[20]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/kde-app-addons.png?resize=800%2C557&ssl=1
|
||||
[21]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/kde-accesibility.png?resize=800%2C564&ssl=1
|
||||
[22]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/gnome-accessibility.png?resize=800%2C487&ssl=1
|
||||
[23]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/gnome-fedora-resource-usage.png?resize=752%2C552&ssl=1
|
||||
[24]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/kde-resource-usage.png?resize=800%2C599&ssl=1
|
||||
[25]: https://www.forbes.com/sites/jasonevangelho/2019/10/23/bold-prediction-kde-will-steal-the-lightweight-linux-desktop-crown-in-2020/?sh=1338b70026d2
|
||||
[26]: https://itsfoss.com/best-kde-distributions/
|
@ -0,0 +1,64 @@
|
||||
[#]: subject: "How to screen share with the Linux KDE Plasma Desktop"
|
||||
[#]: via: "https://opensource.com/article/22/2/screen-share-linux-kde"
|
||||
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14332-1.html"
|
||||
|
||||
如何在 KDE Plasma 桌面进行屏幕共享
|
||||
======
|
||||
|
||||
> krfb 和 krdc 的组合是使远程 Linux 支持变得无挫折感的宝贵工具。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202203/06/102407oi1sz113151dd5bw.jpg)
|
||||
|
||||
如果你曾经做过专业的或出于家庭义务的远程支持,在待命支持时,解决问题只是第二步,更重要的是可见用户屏幕上的实际内容。有多少次你描述了复杂的桌面任务,后来才发现你的用户甚至还没有打开他们的电脑?支持是重要的,但挫折感是真实的,对于需要支持的人和慷慨地试图提供支持的人来说,这都是一种共同的经历。我相信,作为学习新技能的一种方式,人们自己执行任务是很重要的,但也有一种说法是观察专家应该如何做。这就是屏幕共享的作用,KDE Plasma 桌面已经内置了它。
|
||||
|
||||
### 网络安全
|
||||
|
||||
Plasma 桌面使用点对点的邀请模式进行屏幕共享。用户启动一个应用,启动一个虚拟网络连接(VNC)服务器,这时,支持人员就可以远程查看甚至控制计算机。如果这听起来像是潜在的不安全,那是因为它可能就是,但有防火墙的干预。如果你是一个与你不在同一网络上的人的支持人员,那么你必须在屏幕共享工作之前建立一个从你的网络到你的用户的网络的安全通道。理想情况下,你会在紧急情况发生前完成这项工作。
|
||||
|
||||
1. [配置用户的路由器][2],将 VNC 端口(默认为 5900,但你可以使用任何你喜欢的端口)路由到他们的计算机。
|
||||
2. [在用户的本地防火墙中打开一个服务][3],允许 VNC 流量(在你在第一步中指定的端口)。
|
||||
|
||||
### 远程邀请
|
||||
|
||||
为了启动屏幕共享会话,用户必须启动 **krfb**(表示 “KDE remote frame buffer”)应用。这将启动一个 VNC 服务器,并创建一个临时密码。
|
||||
|
||||
![krfb][4]
|
||||
|
||||
**krfb** 使用的默认端口是 5900,但如果你需要,可以在 **krfb** 设置中改变。不过,这可能是你想提前做的事情,这样你就可以避免向你的用户解释如何改变协议的端口。
|
||||
|
||||
### 查看和控制
|
||||
|
||||
当这个窗口打开时,你可以使用你喜欢的 VNC 客户端通过 VNC 登录。KDE 有 **krdc**(表示 “KDE remote desktop client”)应用。在支持的计算机上,启动它并向它提供目标 IP 地址。当你被提示输入密码时,输入你正在连接的 **krfb** 会话中显示的密码。
|
||||
|
||||
![Screen sharing with krdc][6]
|
||||
|
||||
连接上后,你就可以看到你用户的屏幕,你可以在他们遵循你的指示时引导他们。如果他们在遵循你的指示方面有困难,那么你可以控制他们的鼠标,并演示如何做某事。默认情况下,**krfb**(即他们正在运行的应用)在将控制权交给你之前会征求他们的同意。
|
||||
|
||||
### 帮助进行中
|
||||
|
||||
能够看到你的用户所看到的东西可以加速故障排除,减少支持电话双方的挫折感。只要你事先为你的支持设置好网络,**krfb** 和 **krdc** 的组合对于指导新用户完成 Linux 桌面发现之旅的 Linux 专业人士来说是很有价值的工具。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/2/screen-share-linux-kde
|
||||
|
||||
作者:[Seth Kenlon][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/seth
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/laptop_screen_desk_work_chat_text.png?itok=UXqIDRDD (Person using a laptop)
|
||||
[2]: https://opensource.com/article/20/9/firewall
|
||||
[3]: https://opensource.com/article/19/7/make-linux-stronger-firewalls
|
||||
[4]: https://opensource.com/sites/default/files/kde-krfb.jpg (krfb)
|
||||
[5]: https://creativecommons.org/licenses/by-sa/4.0/
|
||||
[6]: https://opensource.com/sites/default/files/kde-krdc-session.jpg (Screen sharing with krdc)
|
@ -0,0 +1,72 @@
|
||||
[#]: subject: "A visual map of a Kubernetes deployment"
|
||||
[#]: via: "https://opensource.com/article/22/3/visual-map-kubernetes-deployment"
|
||||
[#]: author: "Nived Velayudhan https://opensource.com/users/nivedv"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "wxy"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14317-1.html"
|
||||
|
||||
Kubernetes 部署的可视化地图
|
||||
======
|
||||
|
||||
> 通过查看创建一个吊舱或一个部署时的 10 个步骤,可以更好地了解 Kubernetes。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202203/01/095801szxq9lx5prdqkb5y.jpg)
|
||||
|
||||
当你在 Kubernetes 上使用容器时,你经常把应用程序组合在一个<ruby>吊舱<rt>pod</rt></ruby>中。当你把一个容器或一个吊舱发布到生产环境中时,它被称为一个<ruby>部署<rt>deployment</rt></ruby>。如果你每天甚至每周都在使用 Kubernetes,你可能已经这样做过几百次了,但你有没有想过,当你创建一个吊舱或一个部署时到底会发生什么?
|
||||
|
||||
我发现在高层次上了解事件链条是有帮助的。当然,你不一定要理解它。即使你不知道为什么,它仍然在工作。我不打算列出每一件发生的小事,但我的目标是涵盖所有重要的事情。
|
||||
|
||||
这里有一张 Kubernetes 不同组件如何互动的视觉地图。
|
||||
|
||||
![吊舱链条][2]
|
||||
|
||||
你可能注意到,在上图中,我没有包括 etcd。API 服务器是唯一能够直接与 etcd 对话的组件,而且只有它能够对 etcd 进行修改。因此,你可以认为 etcd 在这张图中存在于(隐藏的)API 服务器后面。
|
||||
|
||||
另外,我在这里只讲到了两个主要的控制器(<ruby>部署控制器<rt>Deployment controller</rt></ruby>和<ruby>复制集控制器<rt>ReplicaSet controller</rt></ruby>)。其他的控制器的工作方式类似。
|
||||
|
||||
下面的步骤描述了当你执行 `kubectl create` 命令时会发生什么。
|
||||
|
||||
### 步骤 1 ###
|
||||
|
||||
当你使用 `kubectl create` 命令时,一个 HTTP POST 请求被发送到 API 服务器,其中包含部署清单。API 服务器将其存储在 etcd 数据存储中,并返回一个响应给 `kubectl`。
|
||||
|
||||
### 步骤 2 和 3 ###
|
||||
|
||||
API 服务器有一个观察机制,所有观察它的客户都会得到通知。客户端通过打开与 API 服务器的 HTTP 连接来观察变化,API 服务器会流式地发出通知。其中一个客户端是部署控制器。部署控制器检测到一个<ruby>部署<rt>Deployment</rt></ruby>对象,它用部署的当前规格创建一个<ruby>复制集<rt>ReplicaSet</rt></ruby>。该资源被送回 API 服务器,并存储在 etcd 数据存储中。
|
||||
|
||||
### 步骤 4 和 5 ###
|
||||
|
||||
与上一步类似,所有观察者都会收到关于 API 服务器中的变化的通知。这一次,复制集控制器会接收这一变化。该控制器了解所需的副本数量和对象规格中定义的吊舱选择器,创建吊舱资源,并将这些信息送回 API 服务器,存储在 etcd 数据存储中。
|
||||
|
||||
### 步骤 6 和 7 ###
|
||||
|
||||
Kubernetes 现在拥有运行吊舱所需的所有信息,但吊舱应该在哪个节点上运行?<ruby>调度器<rt>Scheduler</rt></ruby>观察那些还没有分配到节点的吊舱,并开始对所有节点进行过滤和排序,以选择最佳节点来运行吊舱。一旦节点被选中,该信息将被添加到吊舱规格中。而且它被送回 API 服务器并存储在 etcd 数据存储中。
|
||||
|
||||
### 步骤 8、9 和 10 ###
|
||||
|
||||
到目前为止的所有步骤都发生在<ruby>控制平面<rt>control plane</rt></ruby>本身。<ruby>工作节点<rt>worker node</rt></ruby>还没有做任何工作。不过,吊舱的创建并不是由控制平面处理的。相反,在所有节点上运行的 `kubelet` 服务观察 API 服务器中的吊舱规格,以确定它是否需要创建任何吊舱。在调度器选择的节点上运行的 kubelet 服务获得吊舱规格,并指示工作节点上的容器运行时创建容器。这时就会下载一个容器镜像(如果它还不存在的话),容器就会实际开始运行。
|
||||
|
||||
### 理解 Kubernetes 的部署
|
||||
|
||||
对这个一般流程的理解可以帮助你理解 Kubernetes 中的许多事件。考虑一下 Kubernetes 中的<ruby>守护进程集<rt>DaemonSet</rt></ruby>或<ruby>状态集<rt>StatefulSet</rt></ruby>。除了使用不同的控制器外,吊舱的创建过程是一样的。
|
||||
|
||||
课后作业:如果部署被修改为有三个应用程序的副本,导致创建吊舱的事件链条会是什么样子?你可以参考图表或列出的步骤,但你肯定有你需要弄清楚的知识。知识就是力量,你现在有了了解 Kubernetes 的一个重要组成部分。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/3/visual-map-kubernetes-deployment
|
||||
|
||||
作者:[Nived Velayudhan][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[wxy](https://github.com/wxy)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/nivedv
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/containers_modules_networking_hardware_parts.png?itok=rPpVj92- (Parts, modules, containers for software)
|
||||
[2]: https://opensource.com/sites/default/files/uploads/pod-chain_0.png (Pod chain)
|
||||
[3]: https://creativecommons.org/licenses/by-sa/4.0/
|
163
published/20220228 Fedora 36 Release Date and New Features.md
Normal file
163
published/20220228 Fedora 36 Release Date and New Features.md
Normal file
@ -0,0 +1,163 @@
|
||||
[#]: subject: "Fedora 36 Release Date and New Features"
|
||||
[#]: via: "https://news.itsfoss.com/fedora-36-release-date-features/"
|
||||
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "wxy"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14316-1.html"
|
||||
|
||||
Fedora 36 发布时间表和新功能
|
||||
======
|
||||
|
||||
> Fedora 36 很快就要发布了,预期会有哪些功能呢?还有,它准备什么时候发布?
|
||||
|
||||
![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/fedora-36-release.jpg?w=1200&ssl=1)
|
||||
|
||||
Fedora 36 是 [今年最值得期待的发布][1] 之一。
|
||||
|
||||
虽然我们期待每一个重要的发布,但去年,[Fedora 35][2] 以 GNOME 41 和一个新的 KDE 流派(Kinoite)让人期待它带来一些令人兴奋的变化。
|
||||
|
||||
别着急;如果你等不及要看到 Fedora 36,我将重点指出有关该版本的基本细节。
|
||||
|
||||
### Fedora 36 发布日期
|
||||
|
||||
按照官方的时间表,Fedora 36 测试版的早期发布日期是 **2022 年 3 月 15 日**。而且,Fedora 36 测试版的延迟发布日期(万一延迟)是 **2022 年 3 月 22 日**。
|
||||
|
||||
一旦公开测试完成,最终的发布日期可望在 **2022 年 4 月 19 日**。如果出现延迟,发布日期将被推至 **2022 年 4 月 26 日**。
|
||||
|
||||
你还应该注意,Fedora Linux 34 将在 **2022 年 5 月 17 日** 走到其生命的终点。
|
||||
|
||||
![][3]
|
||||
|
||||
你现在可以尝试用每夜构建版来下载 Fedora 36(链接在本文底部),但是距离测试版发布还有几周时间,你应该等等。
|
||||
|
||||
### Fedora 36 功能
|
||||
|
||||
![][4]
|
||||
|
||||
像往常一样,Fedora 36 拥有最新的 GNOME 以及其他的补充和改进。
|
||||
|
||||
主要的亮点包括:
|
||||
|
||||
#### 1、GNOME 42
|
||||
|
||||
[GNOME 42][5] 是一次令人兴奋的升级,有各种视觉和功能的变化。
|
||||
|
||||
它还包括性能和视觉上的调整及其他改进。如果你没了解过 [GNOME 41 增加的功能][6],你也应该看看。
|
||||
|
||||
当然,你可以预期在 Fedora 36 中找到所有这些变化。在这里,我将重点指出那些 Fedora 36 中的细节(如果你没有用上 GNOME 42)。
|
||||
|
||||
### 2、全系统的深色模式
|
||||
|
||||
![][7]
|
||||
|
||||
Fedora 36 享有从 GNOME 42 引入的全系统深色模式。
|
||||
|
||||
虽然在其他 Linux 发行版上有深色模式的实现,但 GNOME 42 帮助 Fedora 36 成为桌面用户的一个有吸引力的选择。
|
||||
|
||||
深色模式完美地融合在一起,给人一种干净的 GNOME 体验。
|
||||
|
||||
### 3、新壁纸
|
||||
|
||||
如果没有一张新的壁纸,其他的改进听起来都很乏味。
|
||||
|
||||
所以,Fedora 设计团队在 Fedora 36 中带来了一张制作精美的壁纸,这是一张风景插图,看起来很不错。
|
||||
|
||||
![][8]
|
||||
|
||||
默认的壁纸有日间/夜间的变体。正如你所注意到的上面的白天的壁纸,下面是晚上的艺术作品。
|
||||
|
||||
![][8a]
|
||||
|
||||
两者看起来都很奇妙,对眼睛也很舒畅。
|
||||
|
||||
### 4、Linux 内核 5.17
|
||||
|
||||
众所周知,Fedora 36 提供最新的 Linux 内核版本。截至目前,它正在运行即将发布的 Linux 内核 5.17 的候选版本。
|
||||
|
||||
随着 Fedora 36 的最终发布,你应该看到 Linux 内核 5.17 的稳定版本。
|
||||
|
||||
### 5、深色/浅色壁纸
|
||||
|
||||
除了 Fedora 36 的新默认壁纸之外,它还具有与 GNOME 42 一起引入的深色/浅色模式壁纸集。
|
||||
|
||||
![][9]
|
||||
|
||||
截至目前,在测试 Fedora 36 工作站(预发布版本)时,我只能找到其中一张壁纸,而不是 GNOME 42 中的整个系列。
|
||||
|
||||
所以,你也许可以期待在 Fedora 36 测试版中增加更多的内容。
|
||||
|
||||
你可以从外观上选择壁纸及其可用的深色/浅色变体。
|
||||
|
||||
### 6、屏幕截图用户界面和本地屏幕录制
|
||||
|
||||
GNOME 42 引入的新的屏幕截图用户界面是一个奇妙的补充。另外,只需切换一下,你就可以开始录制你的屏幕了!
|
||||
|
||||
![][10]
|
||||
|
||||
你可以看到 Fedora 36 的这个功能,工作得非常好。
|
||||
|
||||
### 7、桌面环境更新
|
||||
|
||||
由于显而易见的原因,你应该在 Fedora 36 看到提供的最新的桌面环境。
|
||||
|
||||
最基本的应该是 GNOME 42、[KDE Plasma 5.24][11] 和 Xfce 4.16。
|
||||
|
||||
除此之外,LXQt 也已经更新到 1.0.0。
|
||||
|
||||
### 8、重要的技术变化
|
||||
|
||||
除了视觉上的变化和 Linux 内核的升级,Fedora 36 还有各种技术改进。
|
||||
|
||||
其中一些值得一提的包括:
|
||||
|
||||
* 将系统的 openJDK 包从 Java 11 更新为 Java 17。
|
||||
* 引入了即将推出的 Golang 1.18 版本。
|
||||
* 将各种语言的字体切换为 Noto 字体作为默认字体,以确保文本渲染的一致性。
|
||||
* 今后自动升级时排除推荐软件包的行为(如果你没有安装它们)。
|
||||
* GNU 工具链更新至 gcc 12 和 glibc 2.35。
|
||||
* 修复某些情况下的升级性问题。
|
||||
* 默认的 Wayland 会话与 NVIDIA 专有驱动程序。
|
||||
* 更新 PHP 栈到最新的 8.1.x。
|
||||
* RPM 数据库将被重新定位到 `/usr` 目录,目前它在 `/var`。
|
||||
|
||||
关于更多的技术细节,你可以参考 [官方变更集][12]。如果你想下载预发布版本,你可以从下面的链接抓取 ISO。
|
||||
|
||||
- [Fedora 36(预发布)][13]。
|
||||
|
||||
### 总结
|
||||
|
||||
Fedora 36 将会是一个令人激动的版本。
|
||||
|
||||
当它发布时,我很期待在 Fedora 36 工作站上尝试 Wayland 会话与 NVIDIA 专有驱动程序。
|
||||
|
||||
你对这个版本有什么期待?请在下面的评论中告诉我。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://news.itsfoss.com/fedora-36-release-date-features/
|
||||
|
||||
作者:[Ankush Das][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[wxy](https://github.com/wxy)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://news.itsfoss.com/author/ankush/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://news.itsfoss.com/linux-distro-releases-2022/
|
||||
[2]: https://news.itsfoss.com/fedora-35-release/
|
||||
[3]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/fedora-36-screen.jpg?w=1200&ssl=1
|
||||
[4]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/fedora-36-pre-neofetch.png?w=1008&ssl=1
|
||||
[5]: https://news.itsfoss.com/gnome-42-features/
|
||||
[6]: https://news.itsfoss.com/gnome-41-release/
|
||||
[7]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/fedora-36-dark-mode.jpg?resize=1568%2C740&ssl=1
|
||||
[8]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/f36-01-day.jpg?w=1200&ssl=1
|
||||
[8a]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/f36-02-night.jpg?w=1200&ssl=1
|
||||
[9]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/fedora-36-pre-wallpapers.jpg?w=1126&ssl=1
|
||||
[10]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/fedora-36-screenshot-tool.jpg?w=738&ssl=1
|
||||
[11]: https://news.itsfoss.com/kde-plasma-5-24-lts-release/
|
||||
[12]: https://fedoraproject.org/wiki/Releases/36/ChangeSet
|
||||
[13]: https://kojipkgs.fedoraproject.org/compose/branched/latest-Fedora-36/compose/Workstation/x86_64/iso/
|
@ -0,0 +1,103 @@
|
||||
[#]: subject: "4 Vim features to use to improve productivity"
|
||||
[#]: via: "https://opensource.com/article/22/3/vim-features-productivity"
|
||||
[#]: author: "Hunter Coleman https://opensource.com/users/hunterc"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14325-1.html"
|
||||
|
||||
4 个用于提高生产力的 Vim 功能
|
||||
======
|
||||
|
||||
> Vim 有很多技巧,即使是用过它很多年的人仍然可以学习新东西。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202203/04/102118tgy1i7albn6ndiri.jpg)
|
||||
|
||||
Vim 总在那里。Vim 是当今最流行的文本编辑器之一。这在很大程度上是因为它随处可见。当你通过 SSH 连接到另一个系统时,你可能找不到 [Emacs][2]、[Nano][3] 或 [VSCodium][4],但你可以放心,Vim 就在那里。
|
||||
|
||||
在本文中,我介绍了一些你可以用 Vim 做的中级事情,以加快你的工作流程并通常让你的一天更轻松。本文假设你以前使用过 Vim,已经了解编辑器的基础知识,并希望将你的 Vim 技能提高一个档次。Vim 充满了有用的技巧,没有人真正掌握它,但本文中的五个技巧可以提高你的技能,并希望让你更加爱上最受欢迎和喜爱的文本编辑器之一。
|
||||
|
||||
### Vim 书签
|
||||
|
||||
Vim 提供了一种在文本中添加书签的简单方法。假设你正在编辑一个大文件,并且当前的编辑会话要求你在文件中不同位置的两段文本之间来回跳转。
|
||||
|
||||
首先,你输入 `m`(用于标记)为当前位置设置一个书签,然后为其命名。例如,如果我正在编辑的文件中有一个名称列表,我想稍后再跳回,我可以使用 `mn`(n 表示名称)为文件的该部分添加书签。
|
||||
|
||||
稍后,在编辑文件的另一部分并希望跳回该名称列表时,我有两个选项。我可以输入 \``n`(反引号 n)转到书签的位置,或者我可以键入 `'n`(单引号 n)转到书签所在行的开头。
|
||||
|
||||
当我不再需要书签时,我可以使用 `:delmarks n` 将其删除。`:marks` 会显示我所有的书签。
|
||||
|
||||
请注意,我使用小写字母来命名我的书签。这是故意的。你可以使用小写字母作为本地书签,使用大写字母来使书签在多个文件中具有全局性。
|
||||
|
||||
### Vim 用户定义的缩写
|
||||
|
||||
如果你正在处理的文本有一个长词或短语多次出现,那么每次都完整地输入它会很快变得烦人。幸运的是,Vim 提供了一种创建缩写的简单方法。
|
||||
|
||||
要将 `Acme Painted Fake Roadways, Inc.` 的用户定义缩写设置为 `apfr`, 你需要输入 `:ab apfr Acme Painted Fake Roadways, Inc.`。现在当在编辑模式时,当你在输入 `apfr` 后面更上空格,就会变成 `Acme Painted Fake Roadways, Inc.`。
|
||||
|
||||
当你关闭 Vim 会话时,你使用 `:ab` 设置的任何缩写都会丢失。如果你想在此之前取消设置缩写,你可输入 `:una apfr`。
|
||||
|
||||
### Vim 自动补全
|
||||
|
||||
许多人没有意识到 Vim 带有自动补全功能。如果你在文件中输入以前使用过的长词,这是一个方便的工具。
|
||||
|
||||
假设你正在撰写一篇文章,多次使用 `Antarctica` 一词。使用一次后,下次你可以只输入前几个字母。例如,你输入 `Ant` 然后按下 `Ctrl+P`。 Vim 要么补全单词(如果只有一个选项),要么为你提供可以用箭头键选择的单词列表,继续输入以进一步缩小搜索范围并使用 `Tab` 键选择单词。
|
||||
|
||||
### Vim 范围选择
|
||||
|
||||
使用 Vim,你可以轻松地对文件中的一系列行执行操作。你可以通过起始行号、逗号和结束行号(包括)来指示范围。除了文字行号之外,你还可以使用句点(`.`)表示当前行,使用美元符号 (`$`) 表示文件缓冲区中的最后一行,以及使用百分号(`%`)表示整个文件。
|
||||
|
||||
这里举几个例子来说明。
|
||||
|
||||
如果要删除第 2 到 10 行,请输入(在命令模式下):
|
||||
|
||||
```
|
||||
:2,10d
|
||||
```
|
||||
|
||||
要删除从第 25 行到文件末尾的每一行:
|
||||
|
||||
```
|
||||
:25,$d
|
||||
```
|
||||
|
||||
你可以使用以下命令删除每一行:
|
||||
|
||||
```
|
||||
:%d
|
||||
```
|
||||
|
||||
要将第 5 到 10 行复制(或转移)到第 15 行之后:
|
||||
|
||||
```
|
||||
:5,10t 15
|
||||
```
|
||||
|
||||
要将第 5 行到第 10 行移动到第 15 行之后(而不是复制):
|
||||
|
||||
```
|
||||
:5,10m 15
|
||||
```
|
||||
|
||||
### Vim 提高生产力
|
||||
|
||||
我希望这篇文章教会了你一些关于 Vim 文本编辑器的新知识。 Vim 有很多技巧,即使是使用了多年的人仍然可以学习新事物。总有一些新的和有用的东西可以学习。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/3/vim-features-productivity
|
||||
|
||||
作者:[Hunter Coleman][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/hunterc
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/laptop_screen_desk_work_chat_text.png?itok=UXqIDRDD (Person using a laptop)
|
||||
[2]: https://opensource.com/article/20/3/getting-started-emacs
|
||||
[3]: https://opensource.com/article/20/12/gnu-nano
|
||||
[4]: https://opensource.com/article/20/6/open-source-alternatives-vs-code
|
@ -0,0 +1,177 @@
|
||||
[#]: subject: "I Tested The New Maui Shell On My Linux Phone. Here’s What I Found!"
|
||||
[#]: via: "https://news.itsfoss.com/tested-maui-shell/"
|
||||
[#]: author: "Jacob Crume https://news.itsfoss.com/author/jacob/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "wxy"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14331-1.html"
|
||||
|
||||
在 Linux 手机上测试了新的 Maui Shell 后我发现……
|
||||
======
|
||||
|
||||
> 我在 PinePhone 上测试了 Maui Shell,结果有好有坏。如果你想冒险尝鲜一下,可以按照这个说明进行试验!
|
||||
|
||||
![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/maui-shell.png?w=1200&ssl=1)
|
||||
|
||||
就在一个多月前,我们写了 [Maui Shell 初窥][1]。它是由 Nitrux Linux 团队开发的,我对它流畅的视觉效果,特别是它的融合功能印象深刻。
|
||||
|
||||
同时,我结束了 [我一年的 PinePhone 日用实验][2],这意味着它可以再次自由地进行实验。结果,我很快就自己安装了 Maui Shell,花了不少时间来测试它。
|
||||
|
||||
下面是我的发现!
|
||||
|
||||
### 关于 Maui Shell 开发状态的简短说明
|
||||
|
||||
在我们开始之前,我想指出,Maui Shell 仍处于早期开发阶段。因此,我一般不会提到我注意到的 bug,而是将重点放在它的更基本的方面。
|
||||
|
||||
不过,对于更大的、更耗时的问题例外,所以请记住这一点。
|
||||
|
||||
说完了这些,让我们开始测试吧!
|
||||
|
||||
### 手机上的 Maui Shell
|
||||
|
||||
![][3]
|
||||
|
||||
安装完之后,我就看到了 Maui Shell 的(现在熟悉的)桌面上。随即,非常明显的是,它的缩放比例完全错误,这使得它很难使用。
|
||||
|
||||
幸运的是,Maui 项目的 Telegram 群组的人提供了极大帮助,我没用了一个小时就成功地修复了缩放比例(感谢 @wachidadinugroho)。
|
||||
|
||||
现在好了,我开始测试。
|
||||
|
||||
#### 其性能堪比糖浆流动
|
||||
|
||||
如果你读过我的 PinePhone 点评,你可能记得把它的性能比作糖蜜滴落的速度。不幸的是,Maui Shell 将这一点提升到了一个全新的高度。即使是最基本的互动,如打开快速控制菜单,也要花上五秒钟的时间!
|
||||
|
||||
不幸的是,我的水平还不足以判断这种缓慢的原因,但它很有可能是由软件渲染造成的。如果你不清楚,“软件渲染”是指图形不在 GPU 上渲染,而是在效率和优化程度都更低的 CPU 上(利用软件来)渲染。
|
||||
|
||||
我考虑的另一个可能的罪魁祸首是糟糕的优化(毕竟它还处在早期阶段)。如果是这样的话,那么在未来的几个月里,极有可能在为 Maui Shell 的第一个稳定版本做准备的过程中修复这个问题。
|
||||
|
||||
然而,正如我之前所说的,对我的早期看法要多加注意。
|
||||
|
||||
#### 有望实现的用户体验
|
||||
|
||||
![][4]
|
||||
|
||||
与几乎所有的移动 UI 一样,Maui Shell 在触摸屏上使用起来简单而直观。然而,它也结合了许多桌面元素,这对提高用户体验有很大的作用。
|
||||
|
||||
例如,从屏幕顶部向下滑动会出现一个快速设置菜单,类似于在安卓和 iOS 上发现的那些。
|
||||
|
||||
然而,可以单独点击顶部通知栏的不同部分,会只显示相关的设置,类似于许多桌面环境面板和任务栏上的各种小程序。
|
||||
|
||||
现在,让我们前往 **窗口管理**。
|
||||
|
||||
对于窗口管理,Maui Shell 团队显然从 GNOME 和 iOS 中获得了一些灵感,从屏幕底部向上滑动会显示一个类似 GNOME 的所有运行中的应用程序的概览。我发现这非常直观和简单,老实说,我很惊讶以前没有这样操作过!
|
||||
|
||||
最后,托盘也是 Maui Shell 在手机上的一个重要方面。它在默认情况下自动隐藏,可以通过从屏幕底部向上轻扫来访问。从这里,它显示了所有正在运行的应用程序的图标,以及一个打开应用程序启动器的按钮。
|
||||
|
||||
说到应用启动器,它与 iOS 14 及更高版本中的应用库非常相似。每个应用都被分类,只需轻点几下就能轻松找到并启动。
|
||||
|
||||
总的来说,其实用性有点独特,而且值得探究。而且,这种特性也延伸到了应用程序,它们是用 Mauikit 和 Kirigami 制作的。
|
||||
|
||||
我认为 Maui Shell 团队把基本的东西做得很完美。
|
||||
|
||||
#### 应用程序超棒
|
||||
|
||||
![][5]
|
||||
|
||||
任何用 Mauikit 构建的东西都能与 Maui Shell 完美整合。到目前为止,最大的 Mauikit 应用程序集来自 Maui Shell 的开发方 Maui 项目。其中一些包括:
|
||||
|
||||
* Index
|
||||
* Nota
|
||||
* Station
|
||||
* VVave
|
||||
* Pix
|
||||
* Clip
|
||||
* Buho
|
||||
* Shelf
|
||||
* Communicator
|
||||
|
||||
所有这些应用都能在移动和桌面设备上完美运行,并将桌面级应用带到手机上。我对 [Index][6] 特别满意,它是一个有趣而实用的手机文件管理器。
|
||||
|
||||
![Maui Index app][7]
|
||||
|
||||
除了 Mauikit 应用外,Kirigami 应用也很好用。因此,在桌面和移动设备上都有一个非常适合 Maui Shell 的庞大的应用程序库。
|
||||
|
||||
### 其他观点
|
||||
|
||||
除了这些观察之外,还有一些小问题我想提一下:
|
||||
|
||||
* 不幸的是,现在似乎还没有虚拟键盘。我通过使用 USB-C 连接的键盘来规避这个问题,但这并不意味着不能把它作为手机使用。
|
||||
* 我还发现了几个缩放的问题,我无法解决这些问题。这些问题包括应用程序的缩放比例远远超过 Maui Shell 本身,以及根本没有缩放比例。这也许是由于我的错误造成的,但我觉得不能指望一般的用户能够钻研晦涩的 Qt 专用环境变量。
|
||||
|
||||
### 自己测试 Maui Shell
|
||||
|
||||
如果所有这些问题都不影响你,那么你可以使用下面的说明在 PinePhone 上测试 Maui Shell。需要注意的是,这些都是针对 PinePhone 的,但也可以根据其他需要进行修改:
|
||||
|
||||
* 下载 [Arch Linux ARM][8] 并刷入到 SD 卡上
|
||||
* 用 SD 卡启动,并连接一个外部键盘
|
||||
* 使用凭证 `alarm`/`123456` 登录
|
||||
* 现在使用 `nmtui` 连接到 Wi-Fi,并使用 `sudo pacman -Syu` 更新软件包列表
|
||||
* 运行以下命令(这些命令将需要很长的时间来运行):
|
||||
|
||||
```
|
||||
sudo pacman -S base-devel
|
||||
git clone https://aur.archlinux.org/packages/maui-shell-git
|
||||
git clone https://aur.archlinux.org/packages/mauikit-git
|
||||
cd mauikit-git
|
||||
makepkg -Asi
|
||||
cd ..
|
||||
cd maui-shell-git
|
||||
makepkg -Asi
|
||||
```
|
||||
|
||||
* 使用 [nano][9] 创建一个启动脚本:
|
||||
|
||||
```
|
||||
cd
|
||||
nano start.sh
|
||||
```
|
||||
|
||||
输入如下内容:
|
||||
|
||||
```
|
||||
|
||||
#!/bin/sh
|
||||
|
||||
# in case it's not detected
|
||||
# or you wish to override
|
||||
#
|
||||
# export QT_QPA_EGLFS_PHYSICAL_WIDTH=480
|
||||
# export QT_QPA_EGLFS_PHYSICAL_HEIGHT=270
|
||||
|
||||
export QT_QPA_PLATFORM=eglfs
|
||||
export QT_AUTO_SCREEN_SCALE_FACTOR=0
|
||||
export QT_SCALE_FACTOR=2
|
||||
cask -r -plugin libinput
|
||||
```
|
||||
|
||||
* 使脚本可执行:`chmod +x start.sh`。
|
||||
|
||||
现在,可以用 `./start.sh` 启动 Maui Shell 了。
|
||||
|
||||
就这样!
|
||||
|
||||
你对 Maui Shell 有什么看法?你认为它的融合功能有用吗?请在下面的评论中告诉我们!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://news.itsfoss.com/tested-maui-shell/
|
||||
|
||||
作者:[Jacob Crume][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[wxy](https://github.com/wxy)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://news.itsfoss.com/author/jacob/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://linux.cn/article-14136-1.html
|
||||
[2]: https://linux.cn/article-14235-1.html
|
||||
[3]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/maui-shell-phone.jpg?resize=1568%2C645&ssl=1
|
||||
[4]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/maui-shell-phone-edited.jpg?w=445&ssl=1
|
||||
[5]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/Maui-Apps-edited.png?w=902&ssl=1
|
||||
[6]: https://mauikit.org/apps/index/
|
||||
[7]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/maui-index-app.png?w=1200&ssl=1
|
||||
[8]: https://github.com/dreemurrs-embedded/Pine64-Arch/releases
|
||||
[9]: https://news.itsfoss.com/gnu-nano-6-0-released/
|
260
published/20220305 Vim vs Nano- What Should You Choose.md
Normal file
260
published/20220305 Vim vs Nano- What Should You Choose.md
Normal file
@ -0,0 +1,260 @@
|
||||
[#]: subject: "Vim vs Nano: What Should You Choose?"
|
||||
[#]: via: "https://itsfoss.com/vim-vs-nano/"
|
||||
[#]: author: "Pratham Patel https://itsfoss.com/author/pratham/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "wxy"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14328-1.html"
|
||||
|
||||
Vim 与 nano:你应该选择哪个?
|
||||
======
|
||||
|
||||
我们需要利用文本编辑器来做笔记、写程序,或者编辑系统配置文件来完成一些事情。
|
||||
|
||||
不管你用来做什么,你的 Linux 发行版已经预装了文本编辑器。
|
||||
|
||||
你很可能会注意到一些 [最好的现代文本编辑器][1],如 Gedit、Geany、Kate 等,它们已经预装在你的 Linux 发行版中。然而,这些都是基于 GUI 的程序。
|
||||
|
||||
如果你想通过终端访问文本编辑器怎么办?你应该发现它也内置在你的 Linux 发行版中了。
|
||||
|
||||
![][2]
|
||||
|
||||
Vim 和 nano 是最流行的 [CLI 文本编辑器][3] 之二。
|
||||
|
||||
但是,是什么让它们如此受欢迎?你应该选择哪个作为你的文本编辑器?让我指出一下 Vim 和 nano 的区别,以帮助你决定。
|
||||
|
||||
### 1、基于终端的编辑器介绍
|
||||
|
||||
nano 和 Vim 都提供了大部分的基本功能。虽然 nano 在大多数 Linux 发行版上是内置的,但你必须手动安装 Vim。
|
||||
|
||||
为了比较这两者,让我给你简单介绍一下这两者。
|
||||
|
||||
#### Vim
|
||||
|
||||
![][4]
|
||||
|
||||
Vim 是 “Vi” 文本编辑器的改进版,开发于 1991 年。Vim 是 “<ruby>Vi 改进版<rt>Vi IMproved</rt></ruby>” 的意思。
|
||||
|
||||
Vi 是一个基于终端的文本编辑器,最初于 1976 年为 Unix 操作系统而开发。Vim 是它的一个具有现代功能的增强版。
|
||||
|
||||
考虑到它的各种功能可以帮助编辑程序文件,它也被称为“程序员的文本编辑器”。虽然它提供了一些高级功能,但你也可以用来编辑纯文本文件。
|
||||
|
||||
#### GNU nano
|
||||
|
||||
![][5]
|
||||
|
||||
GNU nano(我们在文章中称它为 “nano”)是一个简单的基于终端的文本编辑器,其灵感来自于 Pico —— 这个基于 Unix 的文本编辑器是华盛顿大学 1989 年开发的 Pine 电子邮件套件的一部分。
|
||||
|
||||
Pico 文本编辑器没有 GPL(许可证),这使得它很难被纳入 Linux 发行版。
|
||||
|
||||
因此,nano 被开发出来作为它的自由软件替代品。nano 编辑器最初被称为 “tip”,然后在 Richard Stallman 宣布它成为正式的 GNU 程序之前重新命名为 nano。
|
||||
|
||||
这个编辑器的亮点是它的易用性和极小的学习曲线。你不一定需要成为程序员才能使用 nano。
|
||||
|
||||
### 2、功能差异
|
||||
|
||||
下面是 Vim 和 nano 的主要功能差异:
|
||||
|
||||
#### Vim 的主要特点
|
||||
|
||||
* 多级撤销
|
||||
* 语法高亮
|
||||
* 命令行编辑
|
||||
* 文件名补完
|
||||
* 多窗口和缓冲区
|
||||
* 折叠
|
||||
* 会话
|
||||
* 支持宏
|
||||
|
||||
#### nano 的主要特点
|
||||
|
||||
* 打开多个文件
|
||||
* 逐行滚动
|
||||
* 撤销/重做
|
||||
* 语法着色
|
||||
* 行号
|
||||
|
||||
请注意,一般来说,Vim 提供了更高级的功能。然而,它们都提供了编辑系统配置文件、编程和文本编辑等基本功能。
|
||||
|
||||
### 3、用作文本编辑器
|
||||
|
||||
在 Vim 或 nano 中打开一个文件很简单,只要输入你想使用的编辑器的名字,然后再输入文件的路径。路径可以是文件的绝对路径,也可以是文件的相对路径。
|
||||
|
||||
```
|
||||
vim Documents/text.txt
|
||||
```
|
||||
|
||||
```
|
||||
nano Documents/text.txt
|
||||
```
|
||||
|
||||
但是,除了用作文本编辑器访问或打开一个文件之外,还有很多功能,对吗?
|
||||
|
||||
如果你想快速比较一下,这里有一些基于我的使用情况的比较点:
|
||||
|
||||
Vim:
|
||||
|
||||
* 模式驱动的编辑器
|
||||
* 在开始时有巨大的学习曲线
|
||||
* 会话恢复
|
||||
* 语法高亮/着色
|
||||
* 提供高级功能
|
||||
|
||||
nano:
|
||||
|
||||
* 易于使用(经常使用的功能及其组合键列在底部)
|
||||
* 不存在学习曲线
|
||||
* 旨在进行快速编辑
|
||||
|
||||
nano 和 Vim 的主要区别在于,它们的目标受众非常不同。
|
||||
|
||||
#### Vim
|
||||
|
||||
Vim 是一个模式驱动的编辑器。这意味着字母、数字和标点符号键在按下时都要做一件独特的事情,而不是在屏幕上打出一个字符。
|
||||
|
||||
这些模式包括:
|
||||
|
||||
* 正常模式
|
||||
* 视觉模式
|
||||
* 插入模式
|
||||
* 命令行命令
|
||||
* 命令行编辑
|
||||
|
||||
默认情况下,当你启动 Vim 时,它以 **正常** 模式打开。每个键都有其独特的功能,不会立即开始输入所按下的字符。
|
||||
|
||||
不管什么模式,如果你愿意,你也可以 [把 Vim 配置成一个写作工具][6]。
|
||||
|
||||
要知道更多关于这些有趣的事情,你可以参考我们关于 [基本 Vim 命令][7] 以及 [Vim 技巧和窍门][8] 的文章。
|
||||
|
||||
![当你启动 Vim(无参数)时的终端屏幕][9]
|
||||
|
||||
在正常模式下,按特定的键会移动你的光标。
|
||||
|
||||
例如,如果你按下 `l`(小写字母 L),它将把光标向右移动一个字符,按 `h` 键将把光标向左移动一个字符。
|
||||
|
||||
如果你想把光标向下移动一行,你就按 `j` 键,如果要把光标向上移动一行,你应该按 `k` 键。
|
||||
|
||||
在正常模式下 `l`、`k`、`j`、`h` 是导航键。虽然你可以用方向键来移动,但这样做更有效率。
|
||||
|
||||
这些是 Vim 中的基本导航键。
|
||||
|
||||
接下来最常用的键是 `w`、`b`、`e`:
|
||||
|
||||
* 按 `w` 键可将光标移到下一个词。如果它已经在一个词的开头,它就会移动到下一个词的开头。
|
||||
* 按 `b` 键,光标会移到左边的词的开头。
|
||||
* 而 `e` 键,则将光标移到右边的词的末尾。
|
||||
|
||||
你甚至可以用这些键混合数字(作为前缀)。例如,按 `6w` 可以将光标向前(向右)移动六个词。
|
||||
|
||||
如果你想进入一个模式,你必须按类似的组合键:
|
||||
|
||||
* `i` 为插入模式
|
||||
* `CTRL+C` 回到正常模式
|
||||
* `:wq` 写入文件并关闭窗口。
|
||||
|
||||
最后,我们已经 [列出了退出 Vim 的多种方法][10],如果你想了解一下的话。
|
||||
|
||||
这只是冰山一角。要学习更多关于 Vim 的知识,你可以使用`vimtutor` 命令,它可以给你提供大多数基本命令的信息,如删除、编辑、保存文件等。
|
||||
|
||||
![][11]
|
||||
|
||||
#### GNU nano
|
||||
|
||||
nano 有一个基本的交互界面,在窗口的底部给你提供关键信息。
|
||||
|
||||
要想有个初步的了解,你可以参考我们的 [nano 编辑器指南][12]。
|
||||
|
||||
![Terminal screen when you launch nano \(without arguments\)] [13]
|
||||
|
||||
你不需要参考手册页或任何文档来执行基本操作。这就是为什么与 Vim 相比,nano 被认为是用户友好的。
|
||||
|
||||
尽管如此,nano 中使用的一些术语仍然是“旧术语”,一个例子是 “<ruby>写出<rt>Write Out</rt></ruby>”、“<ruby>在哪里<rt>Where Is</rt></ruby>”短语,而不是分别用“<ruby>保存<rt>Save</rt></ruby>”和“<ruby>查找<rt>Find</rt></ruby>”。
|
||||
|
||||
但是,这并不是什么大问题。
|
||||
|
||||
虽然很容易习惯,但它与使用记事本或 Gedit(GUI 程序)并不完全相同。
|
||||
|
||||
例如,在大多数现代编辑器中,执行剪切操作的组合键通常是 `Ctrl + X`,但在 nano 中,它是 `Ctrl + K`。
|
||||
|
||||
符号 `^` 是用来表示将 `Ctrl` 键作为修饰键使用,并与旁边的键组合使用。
|
||||
|
||||
你还可以找到像 `Ctrl + F`(将光标向前移动)、`Ctrl + B`(将光标向后移动)这样的组合键。一些快捷键包括:
|
||||
|
||||
* `Ctrl + X` 退出
|
||||
* `Ctrl + O` 写入(或保存为)
|
||||
* `Alt + U` 撤销上一个动作
|
||||
* `Ctrl + ←` 向后退一个字
|
||||
* `Ctrl + →` 向前进一个字
|
||||
|
||||
你可以看看 [GNU nano 的官方速查表][14] 来学习更多的快捷键。
|
||||
|
||||
总的来说,nano 是一个更适合初学者的编辑器,当你只想偶尔编辑一个文件时,它可以简单地让你完成。
|
||||
|
||||
### 4、学习曲线
|
||||
|
||||
考虑到上面的所有信息,你一定已经意识到 Vim 与你所习惯的传统文本编辑器不同。
|
||||
|
||||
这是真的,这就是为什么 Vim 在学习的初始阶段会显得很艰难。
|
||||
|
||||
然而,对于高级用户来说,使用宏、自动补完等高级能力很重要,可以节省时间。
|
||||
|
||||
因此,如果你是一个程序员,或者碰巧经常编辑许多文件,Vim 的学习曲线可能是富有成效的。
|
||||
|
||||
另一方面,nano 提供了极小的学习曲线,而且感觉比基于图形用户界面的文本编辑器如 Gedit 或 Notepad 更让你熟悉。
|
||||
|
||||
### 哪个是最适合你的?
|
||||
|
||||
Vim 和 nano 都是合格的基于终端的文本编辑器。但是,当涉及到你如何与上述编辑器互动和使用时,它们有很大的不同。
|
||||
|
||||
Vim 很灵活,可以适应各种工作流程,前提是你已经习惯了它的工作方式。
|
||||
|
||||
相比之下,nano 工作起来很简单,可以帮助你编辑任何你想要的东西。
|
||||
|
||||
如果你还不确定,我建议先开始使用 nano。而且,如果你认为你需要更快地完成工作,并且想要更多的功能,那么就换成 Vim。
|
||||
|
||||
### 常见的问题
|
||||
|
||||
继续,让我来谈谈几个问题,这将有助于你获得一个良好的开端。
|
||||
|
||||
**Vim 比 nano 好吗?**
|
||||
|
||||
从技术上讲,是的。但是,如果你不需要它提供的所有功能,使用起来可能会感到力不从心。
|
||||
|
||||
**程序员是否使用 Vim?**
|
||||
|
||||
系统管理员和程序员喜欢 Vim 的高级功能。所以,是的,他们倾向于使用它。
|
||||
|
||||
**nano 是否更受欢迎?**
|
||||
|
||||
可以说是的。nano 是一个基于终端的编辑器,被大多数用户使用。此外,它还内置在大多数 Linux 发行版中。
|
||||
|
||||
因此,它在用户中普遍受欢迎,而 Vim 仍然是一个为特定人群服务的编辑器。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/vim-vs-nano/
|
||||
|
||||
作者:[Pratham Patel][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[wxy](https://github.com/wxy)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://itsfoss.com/author/pratham/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://itsfoss.com/best-modern-open-source-code-editors-for-linux/
|
||||
[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/vim-vs-nano.png?resize=800%2C450&ssl=1
|
||||
[3]: https://itsfoss.com/command-line-text-editors-linux/
|
||||
[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/07/vim-screenshot.jpg?resize=800%2C520&ssl=1
|
||||
[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/07/nano-editor-screenshot.jpg?resize=800%2C524&ssl=1
|
||||
[6]: https://news.itsfoss.com/configuring-vim-writing/
|
||||
[7]: https://linuxhandbook.com/basic-vim-commands/
|
||||
[8]: https://itsfoss.com/pro-vim-tips/
|
||||
[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/01_vim_interface.webp?resize=800%2C430&ssl=1
|
||||
[10]: https://itsfoss.com/how-to-exit-vim/
|
||||
[11]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/vimtutor.png?resize=777%2C519&ssl=1
|
||||
[12]: https://itsfoss.com/nano-editor-guide/
|
||||
[13]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/03_nano_interface.webp?resize=800%2C430&ssl=1
|
||||
[14]: https://www.nano-editor.org/dist/latest/cheatsheet.html
|
@ -1,109 +0,0 @@
|
||||
[#]: subject: "KDE’s Dolphin File Manager Finally Brings Root File Operations. Here’s How to Use"
|
||||
[#]: via: "https://www.debugpoint.com/2022/02/dolphin-root-access/"
|
||||
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
KDE’s Dolphin File Manager Finally Brings Root File Operations. Here’s How to Use
|
||||
======
|
||||
AFTER FIVE YEARS OF MAKING, ROOT FILE OPERATION FINALLY LANDS IN THE
|
||||
DOLPHIN FILE MANAGER OF KDE PLASMA DESKTOP. HERE’S HOW TO USE DOLPHIN
|
||||
WITH ROOT ACCESS.
|
||||
The reason was apparent. Unless you know, the root file operation was the only critical feature not available in the famous Dolphin file manager. The developers didn’t want new users to play around in the file system with root privileges. That is not good for a stable system.
|
||||
|
||||
You get a prompt below if you try to open Dolphin today with superuser. It is permanently disabled in the Dolphin code for uid=0.
|
||||
|
||||
```
|
||||
|
||||
Executing Dolphin with sudo is not possible due to unfixable security vulnerabilities.
|
||||
|
||||
```
|
||||
|
||||
![Dolphin root access – how it behaves today \(before polkit+KIO\)][1]
|
||||
|
||||
### A Little History on Dolphin with superuser privileges
|
||||
|
||||
You may need to access specific removable drives, files, and network shares via file manager at any given workflow, which requires admin privileges. But without the Dolphin built-in support, it is difficult today unless you are experienced enough to try out specific hacks (like below), which have been popular until now.
|
||||
|
||||
The following famous command executes polkit to give necessary privileges to Dolphin.
|
||||
|
||||
```
|
||||
|
||||
pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY KDE_SESSION_VERSION=5 KDE_FULL_SESSION=true dolphin
|
||||
|
||||
```
|
||||
|
||||
The users request the feature [many times][2] via bug reports in [forums][3]. And several controversial extensions are created, such as Open Dolphin as Root (<https://store.kde.org/p/1384645/>) or Root action service menu (<https://store.kde.org/p/998469/>). One of them was even reported by users for review. They are very unstable and risky to use because you don’t know what they will do to your system.
|
||||
|
||||
Do not download or use the above two extensions. You may end up with an unstable system.
|
||||
|
||||
### How to use Dolphin as Root
|
||||
|
||||
Now you can forget all these hacks and get to run Dolphin as root out-of-the-box with KDE Framework 5.91. The long-pending feature of implementing Polkit support in the KDE Input/Output library (KIO) is finally implemented and merged.
|
||||
|
||||
And now, Dolphin and other KDE applications can use KIO to give necessary privileges to perform several non-admin actions.
|
||||
|
||||
[][4]
|
||||
|
||||
SEE ALSO: KDE Plasma 5.20 Bringing this Stunning Taskbar Feature in Next Release
|
||||
|
||||
#### Steps
|
||||
|
||||
As of writing this post, this feature is currently in only [Neon Unstable Edition][5] and [openSUSE Krypton][6] due to its nature and [require more testing][7] before being pushed as stable.
|
||||
|
||||
If you are using [KDE Plasma][8] using a privileged account already, you are already running Dolphin as admin. But if you are using an account with limited access to the file system, open or use Dolphin as you used to do.
|
||||
|
||||
Once you try to modify or access any resources or files via Dolphin that you do not have access to, Dolphin will prompt you for an administrator password via KIO.
|
||||
|
||||
To try the code, I tried to modify a file (not admin user) in another user’s (admin) home directory. See the below image. The file opened file. When I am trying to save by the logged-on user (not admin), it prompts for the password which is nothing but the polkit daemon working via KIO and Dolphin.
|
||||
|
||||
![Dolphin root access after KIO with Polkit implementation][9]
|
||||
|
||||
Once you provide the password, you will continue to perform the actions.
|
||||
|
||||
I believe this is a very straightforward approach instead of letting users open Dolphin via root separately. Because this limits users to a specific action via admin privileges. It also minimizes the risk of accidentally changing the file system if the entire Dolphin executable is open as root. And opening Dolphin as sudo would give you the same message as earlier with additional instructions below.
|
||||
|
||||
![Dolphin gives a message while trying to run as a root user][10]
|
||||
|
||||
So, that’s about it.
|
||||
|
||||
### Closing Notes
|
||||
|
||||
Dolphin is undoubtedly the famous and best file manager, but this was the missing piece until today. Resolving the “Open Dolphin as the root” problem is significant because it impacts many users system administrators. Thanks to the entire KDE team to pull this through.
|
||||
|
||||
* * *
|
||||
|
||||
We bring the latest tech, software news and stuff that matters. Stay in touch via [Telegram][11], [Twitter][12], [YouTube][13], and [Facebook][14] and never miss an update!
|
||||
|
||||
##### Also Read
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.debugpoint.com/2022/02/dolphin-root-access/
|
||||
|
||||
作者:[Arindam][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.debugpoint.com/author/admin1/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.debugpoint.com/wp-content/uploads/2022/02/Dolphin-root-access-how-it-behaves-today-before-polkitKIO.jpg
|
||||
[2]: https://forum.kde.org/viewtopic.php?f=224&t=160993
|
||||
[3]: https://askubuntu.com/questions/990611/how-to-run-dolphin-as-root
|
||||
[4]: https://www.debugpoint.com/2020/06/kde-plasma-5-20-new-taskbar/
|
||||
[5]: https://neon.kde.org/download
|
||||
[6]: http://download.opensuse.org/repositories/KDE:/Medias/images/iso/
|
||||
[7]: https://invent.kde.org/frameworks/kio/-/merge_requests/143
|
||||
[8]: https://www.debugpoint.com/tag/kde-plasma
|
||||
[9]: https://www.debugpoint.com/wp-content/uploads/2022/02/Dolphin-root-access-after-KIO-with-Polkit-implementation.jpg
|
||||
[10]: https://www.debugpoint.com/wp-content/uploads/2022/02/Dolphin-gives-a-message-while-trying-to-run-as-root-user.jpg
|
||||
[11]: https://t.me/debugpoint
|
||||
[12]: https://twitter.com/DebugPoint
|
||||
[13]: https://www.youtube.com/c/debugpoint?sub_confirmation=1
|
||||
[14]: https://facebook.com/DebugPoint
|
@ -1,104 +0,0 @@
|
||||
[#]: subject: "Good News! Debian-based Lightweight Linux Distro ‘Slax’ is Still Alive"
|
||||
[#]: via: "https://news.itsfoss.com/slax-11-2/"
|
||||
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Good News! Debian-based Lightweight Linux Distro ‘Slax’ is Still Alive
|
||||
======
|
||||
|
||||
Slax is one of the best [lightweight Linux distributions][1] that can revive an old computer.
|
||||
|
||||
However, we did not get to see any significant development activities since 2018.
|
||||
|
||||
While a testing version based on Debian 10.2 was in the works in 2019, the pandemic could have affected the progress.
|
||||
|
||||
Fast-forward to 2022, finally, now we have a new testing version available (release candidate 2) of **Slax 11.2** based on [Debian Bullseye][2].
|
||||
|
||||
### Slax 11.2: What’s New?
|
||||
|
||||
![Slax 11.2][3]
|
||||
|
||||
Slax 11.2 is almost ready for its final release, with a second release candidate available for testing.
|
||||
|
||||
The latest version is based on Debian Bullseye version 11.2. The changes involve removing a few things and adding new stuff.
|
||||
|
||||
Let me mention the key highlights.
|
||||
|
||||
#### Linux Kernel 5.10 LTS
|
||||
|
||||
![][4]
|
||||
|
||||
[Linux Kernel 5.10][5] LTS introduces many essential changes and performance improvements.
|
||||
|
||||
Not to forget, it also enhances the hardware compatibility options.
|
||||
|
||||
#### Debian 11.2 Base
|
||||
|
||||
With [Debian 11][2] (Bullseye) as its base, you get obvious improvements/package support that you did not have with older Debian releases.
|
||||
|
||||
The most notable benefit includes the support for 32-bit systems, which keeps Slax in its position as one of the [best Linux distributions that support 32-bit computers][6].
|
||||
|
||||
In addition to that, you also get ExFAT support and improvements for the printer/scanner.
|
||||
|
||||
#### PCManFM Lives
|
||||
|
||||
![][7]
|
||||
|
||||
If you have been keeping an eye on its latest test releases, **Tomas M**, the creator, decided to ditch PCManFM (file manager) in favor of tuxCommander, thinking that pcmanfm was no longer available in Debian.
|
||||
|
||||
Fortunately, it is still there. And, PCManFM works super fast as expected!
|
||||
|
||||
#### Adding/Removing Applications
|
||||
|
||||
![][8]
|
||||
|
||||
With Slax 11.2, you get [connman][9] as the network manager and [scite][10] as the text editor.
|
||||
|
||||
Unfortunately, you will no longer find Leafpad and [wicd][11].
|
||||
|
||||
#### AUFS vs. Overlayfs
|
||||
|
||||
AUFS lets you modify the overlay files system and add modules on the fly. However, with AUFS no longer supported by Debian, Slax initially planned to use Overlayfs.
|
||||
|
||||
With the RC2 release, Slax decided to recompile the Linux Kernel and add AUFS from sources to provide the necessary functionalities suitable for Slax.
|
||||
|
||||
### Download Slax 11.2
|
||||
|
||||
You will find both 32-bit and 64-bit versions available for Slax 11.2.
|
||||
|
||||
When publishing this, we only have the RC2 ISO available, which works well as a VM in my brief test.
|
||||
|
||||
You can wait for the stable release or get the release candidate from its [latest blog post][12].
|
||||
|
||||
[Slax 11.2][13]
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://news.itsfoss.com/slax-11-2/
|
||||
|
||||
作者:[Ankush Das][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://news.itsfoss.com/author/ankush/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://itsfoss.com/lightweight-linux-beginners/
|
||||
[2]: https://news.itsfoss.com/debian-11-feature/
|
||||
[3]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ4OCIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4=
|
||||
[4]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjUxNCIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4=
|
||||
[5]: https://news.itsfoss.com/kernel-5-10-release/
|
||||
[6]: https://itsfoss.com/32-bit-linux-distributions/
|
||||
[7]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjU2MSIgd2lkdGg9Ijc1NSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4=
|
||||
[8]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQxOCIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4=
|
||||
[9]: https://wiki.archlinux.org/title/ConnMan
|
||||
[10]: https://www.scintilla.org/SciTE.html
|
||||
[11]: https://wiki.archlinux.org/title/wicd
|
||||
[12]: https://www.slax.org/blog/25843-AUFS-is-a-must.html
|
||||
[13]: https://www.slax.org/
|
@ -0,0 +1,103 @@
|
||||
[#]: subject: "Rocket.Chat and Nextcloud Team up to Offer a Powerful Open-Source Alternative to Office 365, Slack, and Others"
|
||||
[#]: via: "https://news.itsfoss.com/rocket-chat-nextcloud-collaboration/"
|
||||
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Rocket.Chat and Nextcloud Team up to Offer a Powerful Open-Source Alternative to Office 365, Slack, and Others
|
||||
======
|
||||
|
||||
**Warning**: Trying to access array offset on value of type null in **/srv/users/itsfoss/apps/newitsfoss/public/wp-includes/class-wp-block-supports.php** on line **94**
|
||||
|
||||
**Warning**: Trying to access array offset on value of type null in **/srv/users/itsfoss/apps/newitsfoss/public/wp-includes/class-wp-block-supports.php** on line **96**
|
||||
|
||||
Rocket.Chat is one of the [best open-source slack alternatives][1] and Nextcloud is an all-in-one collaboration platform.
|
||||
|
||||
And, they are pretty impressive.
|
||||
|
||||
This is why we use [Rocket.Chat][2] for our internal communication and [Nextcloud][3] to manage tasks/documents. Both of them are incredibly useful for what they are capable of.
|
||||
|
||||
And, now, it looks like Rocket.Chat and Nextcloud are taking things up a notch by developing a native API integration.
|
||||
|
||||
But, what would it do? Let us find out.
|
||||
|
||||
### Partnering to Provide a More Powerful Open-Source Platform
|
||||
|
||||
![][4]
|
||||
|
||||
The primary objective of joining forces is to integrate their existing technologies, offering the best of both worlds.
|
||||
|
||||
As far as I am aware, we do not have a full-fledged open-source alternative to Microsoft 365.
|
||||
|
||||
Of course, you can combine various open-source technologies and choose to use them as a replacement for Microsoft 365.
|
||||
|
||||
But do we want an open-source solution that can replace Microsoft 365 minus the hassles?
|
||||
|
||||
**Yes.**
|
||||
|
||||
That’s what makes Rocket.Chat’s collaboration with Nextcloud exciting.
|
||||
|
||||
Nextcloud’s CEO shared his thoughts on this collaboration in the [press release][5]:
|
||||
|
||||
> _In a post-pandemic world, solutions like Office 365, Dropbox, and Slack will become more popular. This means that all of our data, communication, and digital lives will be in the hands of some big corporations without control, privacy and with this huge vendor lock-in_
|
||||
|
||||
**Frank Karlitschek, Founder and CEO at Nextcloud GmbH**
|
||||
|
||||
To add to his thoughts, Rocket.Chat’s CEO also mentioned the following:
|
||||
|
||||
> _This new interaction between Nextcloud and Rocket.Chat puts us one step closer to building the ultimate open-source alternative to MS 365, giving back privacy and data sovereignty to the users._
|
||||
|
||||
_Gabriel Engel, Founder, and CEO at Rocket.Chat_
|
||||
|
||||
So, we should expect a powerful open-source platform tailored for privacy and security-focused users, with both interesting platforms collaborating.
|
||||
|
||||
### New Features for Nextcloud Users
|
||||
|
||||
With the integration, Nextcloud customers will be able to access Rocket.Chat’s features to improve the effectiveness of communication and collaboration.
|
||||
|
||||
Some of the new features include:
|
||||
|
||||
* Expand collaboration capabilities using Rocket.Chat’s federation and bridges into Slack and Microsoft Teams.
|
||||
* Easily collaborate on projects and documents using Rocket.Chat’s chat right in Nextcloud.
|
||||
* Use a single productivity platform that integrates with other tools including Nexcloud and keeps all communications and notifications in one place.
|
||||
* Leverage more advanced user governance features, access levels, and role-based permissions.
|
||||
* Easily map even the most complex organizational structure into groups, teams, and discussions.
|
||||
* Securely collaborate and communicate with anyone via the world’s leading social media channels such as Whatsapp, Messenger, Twitter, Instagram, Telegram, and others.
|
||||
* Turn their chats into productivity tools using integrations with various HR tools, CRM solutions, ticketing systems, project management solutions, and developer tools to build powerful workflows.
|
||||
* Get access to more services using [Rocket.Chat’s marketplace of apps][6]
|
||||
* Ensure full governance of all their communications using message audits, flexible retention policies, powerful engagement analytics and dashboards, and more
|
||||
* Send advanced message formatting like code snippets, formula syntax, message threads, and more
|
||||
|
||||
|
||||
|
||||
The Rocket.Chat app is now available in the [Nextcloud marketplace][7]. However, it is still a work in progress, and not ready for production yet.
|
||||
|
||||
You should be able to use the new features once the development completes soon enough (mostly, next month). As of now, we do not have any information on any new features being added to Rocket.Chat. Hopefully, there will be something on that with the final release.
|
||||
|
||||
_What are your expectations from this partnership? Do you think Rocket.Chat’s integration with Nextcloud can be an attractive replacement to Office 365, Slack, and Dropbox combined?_
|
||||
|
||||
Let me know what you think in the comments down below.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://news.itsfoss.com/rocket-chat-nextcloud-collaboration/
|
||||
|
||||
作者:[Ankush Das][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://news.itsfoss.com/author/ankush/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://itsfoss.com/open-source-slack-alternative/
|
||||
[2]: https://itsfoss.com/rocket-chat/
|
||||
[3]: https://itsfoss.com/nextcloud/
|
||||
[4]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ1MiIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4=
|
||||
[5]: https://rocket.chat/press-releases/rocket-chat-and-nextcloud
|
||||
[6]: https://rocket.chat/marketplace
|
||||
[7]: https://apps.nextcloud.com/apps/rocketchat_nextcloud
|
@ -0,0 +1,89 @@
|
||||
[#]: subject: "Epic Games Store Now Works on Steam Deck"
|
||||
[#]: via: "https://news.itsfoss.com/epic-games-steam-deck/"
|
||||
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Epic Games Store Now Works on Steam Deck
|
||||
======
|
||||
|
||||
Steam Deck is already making waves to enhance the game support for the Linux platform.
|
||||
|
||||
It runs on **Steam OS 3.0** (based on Arch) and features KDE Plasma. Kudos to Valve for not locking down the platform and letting users experiment with it.
|
||||
|
||||
While it is not available for everyone, it is an exciting piece of hardware challenging handheld Nintendo Switch.
|
||||
|
||||
It may not support all the popular titles yet (like Destiny 2, Fortnite), but it is making good progress with several AAA and indie titles. You can head to the official page of [Deck Verified][1] to check the latest information about supported games.
|
||||
|
||||
Now, to make things more exciting, it turns out that Steam Deck can also run games using the [Epic Games Store][2] (**unofficially**). But, how? Let’s find out.
|
||||
|
||||
### Using the Epic Games Store with Heroic Games Launcher
|
||||
|
||||
Yes, it’s the same [Heroic Games launcher][3] that was in the making [last year][4], and it is already known to work on a Linux desktop.
|
||||
|
||||
And, thanks to Liam Dawe (via [GamingOnLinux][5]), for successfully testing the Heroic Games Launcher (and [Heroic Bash Launcher][6]) on Steam Deck while coordinating with the respective developers.
|
||||
|
||||
![][7]
|
||||
|
||||
If you’re curious: **Heroic Bash Launcher** _is a tool that creates launch scripts (.sh files) for all installed Heroic games and allows you to launch the game directly from the terminal or game frontend/launcher without having any need to open Heroic._
|
||||
|
||||
Here’s how it all went down (as per my brief chat with the developer of Heroic Bash Launcher):
|
||||
|
||||
Initially, with Epic Games Store experiment on Steam Deck, the Steam controller did not work, considering the Epic Games Store ran as a “Non-Steam game” using the Steam client.
|
||||
|
||||
So, the developer of Heroic Bash Launcher, [Rishabh Moharir][8] (also a fellow writer here) suggested using his tool to make it work by following his [wiki guide on GitHub][9].
|
||||
|
||||
The Heroic Bash Launcher works with Epic Games Store on a Linux desktop. So, it was worth a try!
|
||||
|
||||
And, fortunately, it worked!
|
||||
|
||||
### Installing Epic Games Store on Steam Deck
|
||||
|
||||
First, you need to install the **Heroic Games Launcher** on Steam Deck using the available AppImage file in the **Desktop mode**.
|
||||
|
||||
Once done, you need to log in and download the game of your choice.
|
||||
|
||||
Next, you need to download the latest binary files for [legendary][10] and set it as the alternative legendary binary from the launcher’s settings.
|
||||
|
||||
You need to configure and set the compatibility layer to Proton 7.0 from the game settings in the launcher.
|
||||
|
||||
That’s when you need to download the latest [Heroic Bash Launcher binary][11] and run it.
|
||||
|
||||
Finally, you have to add the game to Steam (to find it in Steam Deck’s UI) following the [official wiki guide on GitHub][9].
|
||||
|
||||
Overall, it sure took a while for tinkerers to make it work. And, if you are still confused, you can find the same set of steps with all the details in the [wiki][12] put together by the Heroic Games Launcher team (or refer to the video above).
|
||||
|
||||
To me, it sounds doable and should not be an overwhelming process for most Steam Deck users as of now. Unfortunately, I can’t get my hands on the Steam Deck in India (yet).
|
||||
|
||||
As for the future of Epic Games Store on Steam Deck, we can only hope for the best!
|
||||
|
||||
_Have you tried Steam Deck yet? Let me know your thoughts in the comments down below._
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://news.itsfoss.com/epic-games-steam-deck/
|
||||
|
||||
作者:[Ankush Das][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://news.itsfoss.com/author/ankush/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.steamdeck.com/en/verified
|
||||
[2]: https://www.epicgames.com/store/en-US/
|
||||
[3]: https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher
|
||||
[4]: https://news.itsfoss.com/heroic-games-launcher/
|
||||
[5]: https://www.gamingonlinux.com/2022/03/heroic-games-launcher-now-works-nicely-on-steam-deck/
|
||||
[6]: https://github.com/redromnon/HeroicBashLauncher
|
||||
[7]: https://i0.wp.com/i.ytimg.com/vi/UvuGAQDagWE/hqdefault.jpg?w=780&ssl=1
|
||||
[8]: https://news.itsfoss.com/author/rishabh/
|
||||
[9]: https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher/wiki/Adding-Games-to-Steam-on-Linux
|
||||
[10]: https://github.com/derrod/legendary/releases/
|
||||
[11]: https://github.com/redromnon/HeroicBashLauncher/releases/
|
||||
[12]: https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher/wiki/SteamDeck---Running-Epic-Games
|
@ -1,5 +1,5 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: translator: (sthwhl)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
@ -84,7 +84,7 @@ via: https://opensource.com/article/21/2/try-linux
|
||||
|
||||
作者:[Seth Kenlon][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
译者:[sthwhl](https://github.com/sthwhl)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
@ -1,171 +0,0 @@
|
||||
[#]: subject: "8 Reasons Why I Keep Coming Back to Firefox"
|
||||
[#]: via: "https://news.itsfoss.com/why-mozilla-firefox/"
|
||||
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
8 Reasons Why I Keep Coming Back to Firefox
|
||||
======
|
||||
|
||||
Firefox is a fantastic open-source web browser. Considering it comes pre-installed with most Linux distributions, it does not take rocket science to assume that it is a popular choice among Linux users and privacy enthusiasts.
|
||||
|
||||
However, nothing is ever perfect.
|
||||
|
||||
Whether it is Mozilla Firefox, Google Chrome, Brave, or any of the [best browsers available for Linux][1]. Every option has a trade-off.
|
||||
|
||||
I have been using Firefox for years now, but I recently switched to [Vivaldi][2] for its tab management feature and then tried Brave for a moment as well.
|
||||
|
||||
But, all this time, I found myself constantly going back to Firefox and thinking about it all the time, while I was happy with another web browser (consider it to be a meme).
|
||||
|
||||
So, why do I keep coming back to Firefox? Why do I think Mozilla Firefox is an ideal web browser for everyone?
|
||||
|
||||
Here, let me highlight some pointers:
|
||||
|
||||
### 1\. Privacy-Focused Solution
|
||||
|
||||
![][3]
|
||||
|
||||
Nowadays, every web browser (of course, except Google Chrome) aims to provide privacy-oriented features.
|
||||
|
||||
You will get a variety of options with Brave, and even with Vivaldi.
|
||||
|
||||
Note that this isn’t a feature comparison, but based on what I prefer/noticed.
|
||||
|
||||
Brave lets you customize the tracking protection, but it does not offer a preset. You will find yourself tweaking the blocking protections to get the experience you want. But, Firefox lets you easily choose a “Standard” or “Strict” protection mode without needing to customize individual settings.
|
||||
|
||||
When it comes to Vivaldi, it offers the ability to switch the type of tracking protection quickly, but it is not as good as Firefox. Furthermore, you do not get things like cross-site cookie blocking, and protection against cryptominers/fingerprinters.
|
||||
|
||||
In addition to these subtle differences, Firefox keeps adding new options to its privacy protection offering.
|
||||
|
||||
For instance, the HTTPS-Only mode eliminates the need for any extensions/add-ons that ensure that you connect to the HTTPS version of a page.
|
||||
|
||||
### 2\. Simplified User Interface
|
||||
|
||||
![][4]
|
||||
|
||||
I know that I have complained a lot about Firefox constantly revamping its user interface.
|
||||
|
||||
And, yes, that isn’t very pleasant.
|
||||
|
||||
But, every time I get used to it, I find it a simple and effective user interface. I prefer to enable the dark theme.
|
||||
|
||||
The recent updates have made it easier to access options, add-ons, themes, and more.
|
||||
|
||||
Personally, it feels better than other browsers.
|
||||
|
||||
Here’s to hoping that they do not continue their tradition of breaking the user experience with every major upgrade.
|
||||
|
||||
### 3\. Open Source
|
||||
|
||||
Mozilla Firefox is an open-source web browser. You already know it, but that is what makes it an outstanding choice over proprietary options like Chrome.
|
||||
|
||||
Firefox is the first open-source web browser I tried after moving away from Google Chrome several years ago.
|
||||
|
||||
### 4\. Firefox Multi-Account Containers
|
||||
|
||||
![][5]
|
||||
|
||||
[Firefox Multi-Account Containers][6] is one of the key highlights of Mozilla Firefox.
|
||||
|
||||
It is one of the [best Firefox features][7] if you want to make the most out of your browsing experience without compromising privacy.
|
||||
|
||||
You need to install the [Firefox Multi-Account add-on][8] to get started with it.
|
||||
|
||||
The feature lets you open different browsing tabs isolated from each other. For instance, you can stay logged to two different accounts of the same service using this feature. You have available categories that include Personal, Work, Bank, and more.
|
||||
|
||||
You can choose to create a new container or open your current tab as a container. It is also possible to automatically set a website to open in a new container.
|
||||
|
||||
To take things up a notch, Firefox recently added the ability to enable Mozilla VPN for containers. This way, you can separately secure your browsing experience without enabling the VPN for the rest of the non-container tabs.
|
||||
|
||||
While this may not be for everyone, it is a helpful feature.
|
||||
|
||||
### 5\. Integrated Services
|
||||
|
||||
![][9]
|
||||
|
||||
It is always convenient to have built-in features and services that help enhance the user experience.
|
||||
|
||||
With Firefox, you get various useful tools that you can access quickly.
|
||||
|
||||
The tools include:
|
||||
|
||||
* Save to Pocket button in the address bar to quickly add a webpage/link to read later.
|
||||
* Mozilla’s [VPN service][10].
|
||||
* [Firefox Relay][11] to protect your original email address.
|
||||
* [Firefox Monitor][12] to notify you of data breaches.
|
||||
* And, the password manager, if you use it.
|
||||
|
||||
|
||||
|
||||
### 6\. Active Development
|
||||
|
||||
With every Firefox release, you find some valuable upgrades and improvements.
|
||||
|
||||
Of course, you should expect the same with every major web browser. But, if you are using a less-known browser for its features, you might want to keep an eye on the frequency of updates/development.
|
||||
|
||||
It is important to have security fixes, bug fixes, and other improvements as soon as possible for a secure experience.
|
||||
|
||||
### 7\. Just Works!
|
||||
|
||||
![][13]
|
||||
|
||||
In my case, I prefer convenience over the latest and greatest.
|
||||
|
||||
Even though Firefox manages to offer some industry-first features, it remains a convenient option.
|
||||
|
||||
Having a Firefox account synced to all your browsing data and integrated services is beneficial. You can easily log in to the account on any other device to seamlessly continue your work.
|
||||
|
||||
With Brave, you do have the sync feature, but it does not work the same way. It requires you to have the primary device present to successfully sync the data to another device (considering you’re scanning the QR code).
|
||||
|
||||
Alternatively, you can choose to generate the sync code and keep it with you to sync with a new device But, I find the account-based sync more convenient.
|
||||
|
||||
While Vivaldi offers the account-sync feature, it does not work well with my multi-monitor setup. The buttons become unresponsive, and I also fail to successfully sync after [Vivaldi 5.1 release][14].
|
||||
|
||||
So, Firefox becomes a hassle-free and convenient option.
|
||||
|
||||
### 8\. Fight Against Browser Monopoly
|
||||
|
||||
Last year, we reported that [Firefox lost almost 50 million users][15], making it a big concern for users who still prefer a solid offering not based on Chromium.
|
||||
|
||||
Technically, we do have Firefox forks and a few other [open-source browsers][16]. But, we need Firefox to hold its position to have a viable Chromium alternative.
|
||||
|
||||
### Wrapping Up
|
||||
|
||||
I should mention that I stick to Firefox because it fits my use-case and workflow.
|
||||
|
||||
You don’t have to take my word for it. But, at least, if you never considered these as benefits of using Firefox, you might want to give it a try!
|
||||
|
||||
_What do you think about Mozilla Firefox? Mind telling us about your favorite browser? Let’s talk in the comments below._
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://news.itsfoss.com/why-mozilla-firefox/
|
||||
|
||||
作者:[Ankush Das][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://news.itsfoss.com/author/ankush/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://itsfoss.com/best-browsers-ubuntu-linux/
|
||||
[2]: https://itsfoss.com/install-vivaldi-ubuntu-linux/
|
||||
[3]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjY2NCIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4=
|
||||
[4]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjUwOCIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4=
|
||||
[5]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9Ijc0NyIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4=
|
||||
[6]: https://itsfoss.com/firefox-containers/
|
||||
[7]: https://itsfoss.com/firefox-useful-features/
|
||||
[8]: https://addons.mozilla.org/en-US/firefox/addon/multi-account-containers/
|
||||
[9]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9Ijc1OCIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4=
|
||||
[10]: https://www.mozilla.org/en-US/products/vpn/
|
||||
[11]: https://relay.firefox.com
|
||||
[12]: https://monitor.firefox.com/
|
||||
[13]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ2OCIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4=
|
||||
[14]: https://news.itsfoss.com/vivaldi-5-1-release/
|
||||
[15]: https://news.itsfoss.com/firefox-decline/
|
||||
[16]: https://itsfoss.com/open-source-browsers-linux/
|
143
sources/talk/20220221 6 Reasons to Try Nitrux OS.md
Normal file
143
sources/talk/20220221 6 Reasons to Try Nitrux OS.md
Normal file
@ -0,0 +1,143 @@
|
||||
[#]: subject: "6 Reasons to Try Nitrux OS"
|
||||
[#]: via: "https://news.itsfoss.com/reasons-to-try-nitrux-os/"
|
||||
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
6 Reasons to Try Nitrux OS
|
||||
======
|
||||
|
||||
Nitrux OS may not be one of the mainstream Linux distributions, but it is surely one of the unique offerings.
|
||||
|
||||
We have also [interviewed its creator Uri Herrera][1] in 2019 to learn how they initially aimed to go beyond the traditional Linux distributions.
|
||||
|
||||
And, since then, we’ve come a long way to its recent [Nitrux 2.0 release][2].
|
||||
|
||||
Not to forget, they also [ditched Ubuntu as its base in favor of Debian][3], last year.
|
||||
|
||||
So, considering a lot has happened, and it’s been around for a few years now. Should you give it a try?
|
||||
|
||||
Here, I highlight some reasons to try [Nitrux OS][4]:
|
||||
|
||||
### 1\. It Isn’t Ubuntu-based
|
||||
|
||||
![][5]
|
||||
|
||||
Most Linux distributions recommended for everyday use are based on Ubuntu.
|
||||
|
||||
Of course, our [recommendations for beginners][6] also include mostly Ubuntu Linux, but don’t let that fool you.
|
||||
|
||||
The only reason we recommend Ubuntu-based distros is it’s an easy-to-use distro with direct support for a lot of commercial software products.
|
||||
|
||||
So, if you are not entirely new to Linux, and want to try something refreshing, stable but familiar, Nitrux OS as a Debian-based distro can be a good fit.
|
||||
|
||||
You can work your way through the terminal without a steep learning curve, whenever needed.
|
||||
|
||||
If you are curious, refer to our [comparison between Debian and Ubuntu][7] to learn more.
|
||||
|
||||
### 2\. Focus on AppImages
|
||||
|
||||
![][5]
|
||||
|
||||
[AppImage][8] is a universal packaging system that does not depend on anything. You do not need a package manager, or any dependencies on your distro, to make it work.
|
||||
|
||||
It aims to be portable, efficient and does not need any setup/installation. Just like portable Windows executables.
|
||||
|
||||
And, Nitrux OS focuses on using AppImage applications to give you a seamless app experience.
|
||||
|
||||
The NX Software Center is a GUI to manage and install AppImage applications built using MauiKit (its UI framework).
|
||||
|
||||
### 3\. A KDE-Based Distro
|
||||
|
||||
![][5]
|
||||
|
||||
Nitrux OS is one of the [best Linux distributions featuring KDE.][9] If you dislike using GNOME or any other desktop environment (DE) out-of-the-box, KDE is a nice alternative to try.
|
||||
|
||||
In case you didn’t know, [KDE can be customized in many ways][10] compared to other DEs.
|
||||
|
||||
So, if you want to personalize your desktop with the widest range of options, KDE lets you do that without much effort.
|
||||
|
||||
### 4\. Unique User Experience
|
||||
|
||||
![][11]
|
||||
|
||||
Nitrux UX combines the best of KDE, and Qt technologies along with its tweaks to give you a refreshing user experience.
|
||||
|
||||
While it does not feel completely alien, your workflow will feel a bit different when using Nitrux OX.
|
||||
|
||||
Even without any customizations from your side, the out-of-the-box experience is solid enough to count it as one of the [most beautiful distributions][12].
|
||||
|
||||
### 5\. Maui Shell
|
||||
|
||||
![][11]
|
||||
|
||||
[Maui Shell][13] is a key highlight of Nitrux’s user experience. Recently, it has managed to put some promising work presenting a convergent interface for both desktop and mobiles/tablets.
|
||||
|
||||
While it hasn’t matured enough, it already looks pretty. And, as exciting as [System76’s upcoming Rust-based desktop environment][14].
|
||||
|
||||
It can be one of the most important reasons to try Nitrux OS to see it unfold a new era of the desktop experience, who knows?
|
||||
|
||||
### 6\. Xanmod Kernel
|
||||
|
||||
![][5]
|
||||
|
||||
[Xanmod Kernel][15] is a customized version of the mainline Linux Kernel with performance tweaks and additional features. This should help you improve the desktop experience.
|
||||
|
||||
Starting with Nitrux 2.0, Xanmod Kernel will be the default Linux Kernel to provide you with an enhanced desktop experience.
|
||||
|
||||
You also get the option to choose other Linux Kernels like Liquorix and Libre, each of their benefits.
|
||||
|
||||
Or, you can also choose to go with mainline LTS Linux Kernel, if you do not prefer Xanmod. So, you’ve complete freedom and the ability to seamlessly choose a different kernel if you want to ditch the default.
|
||||
|
||||
[Nitrux OS][4]
|
||||
|
||||
### Wrapping Up
|
||||
|
||||
It is important to consider all the risks when switching from a mainstream distribution to options like Nitrux OS.
|
||||
|
||||
But, **I’d like you to give this a thought:**
|
||||
|
||||
Distributions like Nitrux OS passionately try to improve things as per their vision.
|
||||
|
||||
Even without corporate backing or massive funds to help them, they have been able to develop this amazing distribution, developed [Maui project][16], and the interesting Maui shell.
|
||||
|
||||
So, I think we should try our best to support them in any way we can.
|
||||
|
||||
That being said, every Linux distribution comes with its share of issues. Whenever you take a leap with a new distro, you might want to give it some time before getting comfortable with it as your daily driver.
|
||||
|
||||
So, I would suggest trying it in your spare time or setting up a virtual machine to test things out.
|
||||
|
||||
_I_‘_d be curious if you like/hate the experience. Let me know your thoughts after trying it out in the comments below._
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://news.itsfoss.com/reasons-to-try-nitrux-os/
|
||||
|
||||
作者:[Ankush Das][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://news.itsfoss.com/author/ankush/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://itsfoss.com/nitrux-linux/
|
||||
[2]: https://news.itsfoss.com/nitrux-2-0-release/
|
||||
[3]: https://news.itsfoss.com/nitrux-linux-debian/
|
||||
[4]: https://nxos.org/
|
||||
[5]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ2OCIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4=
|
||||
[6]: https://itsfoss.com/best-linux-beginners/
|
||||
[7]: https://itsfoss.com/debian-vs-ubuntu/
|
||||
[8]: https://itsfoss.com/use-appimage-linux/
|
||||
[9]: https://itsfoss.com/best-kde-distributions/
|
||||
[10]: https://itsfoss.com/kde-customization/
|
||||
[11]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQzOSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4=
|
||||
[12]: https://itsfoss.com/beautiful-linux-distributions/
|
||||
[13]: https://news.itsfoss.com/maui-shell-unveiled/
|
||||
[14]: https://news.itsfoss.com/system76-cosmic-panel/
|
||||
[15]: https://xanmod.org/
|
||||
[16]: https://mauikit.org
|
@ -1,275 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Secure your containers with SELinux)
|
||||
[#]: via: (https://opensource.com/article/20/11/selinux-containers)
|
||||
[#]: author: (Mike Calizo https://opensource.com/users/mcalizo)
|
||||
|
||||
Secure your containers with SELinux
|
||||
======
|
||||
Hack your system to understand why it's important to configure SELinux
|
||||
to be your first line of container defense.
|
||||
![Three closed doors][1]
|
||||
|
||||
When things aren't working correctly in your Linux environment, the easiest thing to do is disable Security-Enhanced Linux ([SELinux][2]). Things suddenly begin to work, and you forget about it—but this is a common pitfall that means you've lost a very powerful security tool.
|
||||
|
||||
Threats are rising alongside the rise of containers, microservices, and distributed architecture. This is due to an old, well-known issue: velocity. The advantage of containers is that they enable you to move fast, do more, and change quickly. This means container adoption has gone off the roof, but the speed it affords also means you will encounter more issues and vulnerabilities. This happens naturally when you're doing more things faster and quicker.
|
||||
|
||||
### How to mitigate threats
|
||||
|
||||
As Sun Tzu said, "The wise warrior avoids the battle." This quote really resonates when it comes to containers' basic defense. To avoid problems (battles), make sure that your container host is secure and that you can use SELinux as your first line of defense.
|
||||
|
||||
SELinux is an open source project released in 2000 and integrated into the Linux kernel in 2003. According to [Red Hat's explainer][3], "SELinux is a security architecture for [Linux systems][4] that allows administrators to have more control over who can access the system. It was originally developed by the United States National Security Agency (NSA) as a series of patches to the [Linux kernel][5] using Linux Security Modules (LSM)."
|
||||
|
||||
### Get started
|
||||
|
||||
When you think about containers, the first thing that probably comes into mind is [Docker][6]. Docker started a container adoption revolution after it emerged in 2013. It is one of the main reasons that containers exploded in popularity, but as mentioned above, the high level of adoption increased users' vulnerability to security risks.
|
||||
|
||||
Before you can secure your Docker containers with SELinux, you need to set some things up.
|
||||
|
||||
#### Prerequisites:
|
||||
|
||||
* CentOS 8/RHEL 8 installed and configured
|
||||
* Docker CE installed and configured
|
||||
* Two accounts created: root and non-root (`mcalizo` in the examples below)
|
||||
|
||||
|
||||
|
||||
If you need to set up Docker on your RHEL 8/CentOS 8 server, you can follow these [instructions][7]. If you're running RHEL 8, you need to remove the pre-installed Podman and runc packages before beginning.
|
||||
|
||||
First, make sure SELinux is enabled:
|
||||
|
||||
|
||||
```
|
||||
[mcalizo@Rhel82 ~]$ sestatus
|
||||
SELinux status: enabled
|
||||
SELinuxfs mount: /sys/fs/selinux
|
||||
SELinux root directory: /etc/selinux
|
||||
Loaded policy name: targeted
|
||||
Current mode: enforcing
|
||||
Mode from config file: enforcing
|
||||
Policy MLS status: enabled
|
||||
Policy deny_unknown status: allowed
|
||||
Memory protection checking: actual (secure)
|
||||
Max kernel policy version: 31
|
||||
[mcalizo@Rhel82 ~]$
|
||||
```
|
||||
|
||||
Then, verify your OS version and that Docker is running. Log in as root and run:
|
||||
|
||||
|
||||
```
|
||||
[root@rhel82 ~]# cat /etc/redhat-release
|
||||
Red Hat Enterprise Linux release 8.2 (Ootpa)
|
||||
[root@rhel82 ~]#
|
||||
|
||||
[root@rhel82 ~]# systemctl status docker
|
||||
● docker.service - Docker Application Container Engine
|
||||
Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
|
||||
Active: active (running) since Wed 2020-10-28 19:10:14 EDT; 15s ago
|
||||
Docs: <https://docs.docker.com>
|
||||
Main PID: 30768 (dockerd)
|
||||
Tasks: 8
|
||||
Memory: 39.0M
|
||||
CGroup: /system.slice/docker.service
|
||||
└─30768 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
|
||||
|
||||
Oct 28 19:10:13 rhel82.home.labs.com dockerd[30768]: time="2020-10-28T19:10:13.889602941-04:00" level=error msg=">
|
||||
Oct 28 19:10:13 rhel82.home.labs.com dockerd[30768]: time="2020-10-28T19:10:13.903413613-04:00" level=warning msg>
|
||||
Oct 28 19:10:13 rhel82.home.labs.com dockerd[30768]: time="2020-10-28T19:10:13.903427451-04:00" level=warning msg>
|
||||
Oct 28 19:10:13 rhel82.home.labs.com dockerd[30768]: time="2020-10-28T19:10:13.903538271-04:00" level=info msg="L>
|
||||
Oct 28 19:10:14 rhel82.home.labs.com dockerd[30768]: time="2020-10-28T19:10:14.132060506-04:00" level=info msg="D>
|
||||
Oct 28 19:10:14 rhel82.home.labs.com dockerd[30768]: time="2020-10-28T19:10:14.308943088-04:00" level=info msg="L>
|
||||
Oct 28 19:10:14 rhel82.home.labs.com dockerd[30768]: time="2020-10-28T19:10:14.319438549-04:00" level=info msg="D>
|
||||
Oct 28 19:10:14 rhel82.home.labs.com dockerd[30768]: time="2020-10-28T19:10:14.319570298-04:00" level=info msg="D>
|
||||
Oct 28 19:10:14 rhel82.home.labs.com dockerd[30768]: time="2020-10-28T19:10:14.333419209-04:00" level=info msg="A>
|
||||
Oct 28 19:10:14 rhel82.home.labs.com systemd[1]: Started Docker Application Container Engine
|
||||
```
|
||||
|
||||
Check your Docker version:
|
||||
|
||||
|
||||
```
|
||||
[root@rhel82 ~]# docker --version
|
||||
Docker version 19.03.13, build 4484c46d9d
|
||||
```
|
||||
|
||||
### Hack your host
|
||||
|
||||
One of the best ways to understand a problem is to experience it. So, I'll show you how easy it is to inject malicious code into a Docker host if your security is not set up properly.
|
||||
|
||||
To be able to do something bad on the Docker host, the malicious non-root user (`mcalizo` in this tutorial) must be part of the group that can instantiate Docker containers.
|
||||
|
||||
First, confirm what group the `mcalizo` user belongs to:
|
||||
|
||||
|
||||
```
|
||||
[root@Rhel82 ~]# groups mcalizo
|
||||
mcalizo : mcalizo
|
||||
```
|
||||
|
||||
The output shows that `mcalizo` belongs only to its own group. This means `mcalizo` can't instantiate Docker containers and will get this error if it tries:
|
||||
|
||||
|
||||
```
|
||||
[mcalizo@Rhel82 ~]$ docker run -it --rm centos:latest /bin/sh
|
||||
docker: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.40/containers/create: dial unix /var/run/docker.sock: connect: permission denied.
|
||||
See 'docker run --help'.
|
||||
```
|
||||
|
||||
To allow `mcalizo` to instantiate the container, add the user to the `docker` group:
|
||||
|
||||
|
||||
```
|
||||
[root@Rhel82 ~]# usermod -G docker -a mcalizo
|
||||
[root@Rhel82 ~]# groups mcalizo
|
||||
mcalizo : mcalizo docker
|
||||
```
|
||||
|
||||
Next, deploy a `fedora:latest` container and log into the instantiated container to explore it:
|
||||
|
||||
|
||||
```
|
||||
[mcalizo@Rhel82 ~]$ docker run -it --rm fedora:latest /bin/sh
|
||||
Unable to find image 'fedora:latest' locally
|
||||
latest: Pulling from library/fedora
|
||||
ee7e89337106: Pull complete
|
||||
Digest: sha256:b9ec86d36fca7b1d3de39cd7c258e8d90c377d312c21a7748071ce49069b8db4
|
||||
Status: Downloaded newer image for fedora:latest
|
||||
sh-5.0# cat /etc/redhat-release
|
||||
Fedora release 33 (Thirty Three)
|
||||
```
|
||||
|
||||
While you're logged into the newly created container, you can see you are automatically logged in as root:
|
||||
|
||||
|
||||
```
|
||||
sh-5.0# whoami
|
||||
root
|
||||
sh-5.0#
|
||||
```
|
||||
|
||||
As `root` user, you can do anything in this container, which means you can exploit the container host and do a lot of damage. Because you can instantiate a container, you can do things to the host even if you are not part of the host's sudoers account.
|
||||
|
||||
Exit the container you just created, and create a new container to demonstrate the exploit:
|
||||
|
||||
|
||||
```
|
||||
[mcalizo@Rhel82 ~]$ docker run -it --rm -v /:/exploit fedora:latest /bin/bash
|
||||
[root@131043f2e306 /]#
|
||||
```
|
||||
|
||||
The [-v option][8] mounts the Docker host's `/` directory to the container under the `/exploit` directory:
|
||||
|
||||
|
||||
```
|
||||
[root@131043f2e306 /]#ls exploit/
|
||||
bin boot dev etc home lib lib64 media mnt opt proc root run sbin srv sys tmp usr var
|
||||
```
|
||||
|
||||
Because it is mounted, you can do _anything_ on the Docker host. For example, you can delete files, edit specific configurations to harm the system, or even install a Trojan horse application or other malware to steal important information.
|
||||
|
||||
### Why does this happen?
|
||||
|
||||
You may be wondering why this is possible since SELinux is in enforcing mode. Dig deeper into SELinux to see where things went wrong.
|
||||
|
||||
Verify that SELinux has a [Docker context][9]:
|
||||
|
||||
|
||||
```
|
||||
[mcalizo@Rhel82 ~]$ ps -eZ | grep docker
|
||||
system_u:system_r:container_runtime_t:s0 30768 ? 00:00:04 dockerd
|
||||
[mcalizo@Rhel82 ~]$
|
||||
```
|
||||
|
||||
As expected, it does. This means SELinux manages the Docker daemon. Inspect the Docker daemon to see if SELinux is enabled by default:
|
||||
|
||||
|
||||
```
|
||||
[mcalizo@Rhel82 ~]$ docker info | grep Security -A3
|
||||
Security Options:
|
||||
seccomp
|
||||
Profile: default
|
||||
Kernel Version: 4.18.0-193.el8.x86_64
|
||||
```
|
||||
|
||||
SELinux is _not_ enabled by default. This is the problem! To fix it, enable SELinux to control and manage Docker by updating or creating the file `/etc/docker/daemon.json` as [documented here][10] (you must have root access to do this):
|
||||
|
||||
|
||||
```
|
||||
[root@Rhel82 ~]# cat /etc/docker/daemon.json
|
||||
{
|
||||
"selinux-enabled": true
|
||||
}
|
||||
[root@Rhel82 ~]#
|
||||
[root@Rhel82 ~]# systemctl restart docker
|
||||
```
|
||||
|
||||
After creating or updating the file and restarting Docker, you should see that SELinux support is enabled in the Docker daemon:
|
||||
|
||||
|
||||
```
|
||||
[root@Rhel82 ~]# systemctl restart docker
|
||||
[mcalizo@Rhel82 root]$ docker info | grep Security -A3
|
||||
Security Options:
|
||||
seccomp
|
||||
Profile: default
|
||||
selinux
|
||||
[mcalizo@Rhel82 root]$
|
||||
```
|
||||
|
||||
While it's still possible to mount a specific filesystem in your Docker host on your Docker container, updating or accessing the file is no longer allowed:
|
||||
|
||||
|
||||
```
|
||||
[mcalizo@Rhel82 root]$ docker run -it --rm -v /:/exploit fedora:latest /bin/bash
|
||||
[root@ecb5836da1f6 /]# touch /exploit/etc/shadow.sh
|
||||
touch: cannot touch '/exploit/etc/shadow.sh': Permission denied
|
||||
[root@ecb5836da1f6 /]#
|
||||
```
|
||||
|
||||
### Learn more
|
||||
|
||||
Your first line of defense in the container world depends on how strongly you set up your container hosts' operating system. There are numerous ways to implement Linux security, including options available on the market to augment your security posture.
|
||||
|
||||
SELinux is an additional layer of security that is built into [Linux distributions][11] by default. To take advantage of it and protect your system against compromise, make sure SELinux remains on.
|
||||
|
||||
If you want to learn more, see:
|
||||
|
||||
* [How to install Docker CE on CentOS 8 / RH][7]
|
||||
* [Docker security cheat sheet][12]
|
||||
* [dockerd documentation][10]
|
||||
* [Use volumes documentation][8]
|
||||
* [What is SELinux?][3]
|
||||
|
||||
|
||||
|
||||
Few things in the Linux world evoke a strong reaction like SELinux , the security enhancement for...
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/11/selinux-containers
|
||||
|
||||
作者:[Mike Calizo][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/mcalizo
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/EDU_UnspokenBlockers_1110_A.png?itok=x8A9mqVA (Three closed doors)
|
||||
[2]: https://en.wikipedia.org/wiki/Security-Enhanced_Linux
|
||||
[3]: https://www.redhat.com/en/topics/linux/what-is-selinux
|
||||
[4]: https://www.redhat.com/en/topics/linux/what-is-linux
|
||||
[5]: https://www.redhat.com/en/topics/linux/what-is-the-linux-kernel
|
||||
[6]: https://opensource.com/resources/what-docker
|
||||
[7]: https://www.linuxtechi.com/install-docker-ce-centos-8-rhel-8/
|
||||
[8]: https://docs.docker.com/storage/volumes/
|
||||
[9]: https://docs.docker.com/engine/reference/commandline/context/
|
||||
[10]: https://docs.docker.com/engine/reference/commandline/dockerd/
|
||||
[11]: https://www.redhat.com/en/topics/linux/whats-the-best-linux-distro-for-you
|
||||
[12]: https://cheatsheetseries.owasp.org/cheatsheets/Docker_Security_Cheat_Sheet.html
|
@ -2,7 +2,7 @@
|
||||
[#]: via: (https://www.debugpoint.com/2021/06/libreoffice-like-microsoft-office/)
|
||||
[#]: author: (Arindam https://www.debugpoint.com/author/admin1/)
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: translator: (robsean)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
@ -2,7 +2,7 @@
|
||||
[#]: via: (https://itsfoss.com/dual-boot-fedora-windows/)
|
||||
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: translator: (robsean)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
@ -1,245 +0,0 @@
|
||||
[#]: subject: "Bash Shell Scripting for beginners (Part 3)"
|
||||
[#]: via: "https://fedoramagazine.org/bash-shell-scripting-for-beginners-part-3"
|
||||
[#]: author: "Matthew Darnell https://fedoramagazine.org/author/zexcon/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Bash Shell Scripting for beginners (Part 3)
|
||||
======
|
||||
|
||||
![][1]
|
||||
|
||||
Welcome to part 3 of Bash Shell Scripting at a beginner level. This final article will look at a few more items that will get you primed for your continued personal development. It will touch on functions, using comparisons with _if/elif_ statements, and will wrap up with looking into the _while_ loop.
|
||||
|
||||
### Functions
|
||||
|
||||
Let’s start out with a basic concept that might seem difficult but is really simple, the function. Think of this as a simple way to put a part of a script that is used over and over into one reusable group. Anything you have done in article 1 or 2 can be put into a function. So let’s put a function into our learnToScript.sh file. Let me point out a few things. You will need a name for your function, the opening and closing parentheses, and curly brackets to enclose the commands that are included in your function.
|
||||
|
||||
```
|
||||
|
||||
#!/bin/bash
|
||||
|
||||
#A function to return an echo statement.
|
||||
helloFunc() {
|
||||
echo "Hello from a function."
|
||||
}
|
||||
|
||||
#invoke the first function helloFunc()
|
||||
helloFunc
|
||||
|
||||
```
|
||||
|
||||
Below you will see the output.
|
||||
|
||||
```
|
||||
|
||||
[zexcon@fedora ~]$ ./learnToScript.sh
|
||||
Hello from a function.
|
||||
[zexcon@fedora ~]$
|
||||
|
||||
```
|
||||
|
||||
Functions are a good way to reuse a group of commands but they can be even more useful if you can make them operate on different data each time they are used. This requires that you provide data, referred to as arguments, to the function each time you call it.
|
||||
|
||||
To provide arguments, you simply add them after the function name when you invoke it. To use the data you provide, you use the positional references in the function commands. They will be named $1, $2, $3, and so on, depending on the number of arguments your function will need.
|
||||
|
||||
Let’s modify the last example to help understand this better.
|
||||
|
||||
```
|
||||
|
||||
#!/bin/bash
|
||||
|
||||
#A function to return an echo statement.
|
||||
helloFunc() {
|
||||
echo "Hello from a function."
|
||||
echo $1
|
||||
echo $2
|
||||
echo "You gave me $# arguments"
|
||||
}
|
||||
|
||||
#invoke the function helloFunc()
|
||||
helloFunc "How is the weather?" Fine
|
||||
|
||||
```
|
||||
|
||||
The output is shown below.
|
||||
|
||||
```
|
||||
|
||||
Hello from a function.
|
||||
How is the weather?
|
||||
Fine
|
||||
You gave me 2 arguments
|
||||
|
||||
```
|
||||
|
||||
What is happening in the output is _helloFunc()_ did an echo on each line. First it does an echo of “Hello from a function”, then it moves to echo the value of variable $1, this is the result of what you passed to helloFunc with “How is the weather?”. It will then move onto variable $2 and echo its value that is the second item you passed “Fine”. The function will finish by returning the echo “You gave me $# arguments”. Notice that the first argument was a single string enclosed in double quotes, “How is the weather?” . The second one, “Fine”, had no spaces so the quotes where not needed.
|
||||
|
||||
In addition to using $1, $2, etc. you can determine the number of arguments being passed to the function by using the variable $#. This means that you can create a function which accepts a variable number of arguments.
|
||||
|
||||
There are many good references on line for more details on bash functions. [Here is one to get you started][2].
|
||||
|
||||
I hope you can see how functions can provide great flexibility in your bash scripts.
|
||||
|
||||
### Numeric comparisons []
|
||||
|
||||
If you want to do a numerical comparison you will need to use one of the following operators between square brackets [] .
|
||||
|
||||
-eq (is equal)
|
||||
|
||||
-ge (equal or greater than)
|
||||
|
||||
-gt (greater than)
|
||||
|
||||
-le (less than or equal)
|
||||
|
||||
-lt (less than)
|
||||
|
||||
-ne (not equal)
|
||||
|
||||
So for example if you wanted to see if 12 is equal to or less than 25 it would you like [ 12 -le 25 ]. The 12 and 25, of course, can be variables. For example, [$twelve -le $twentyfive].
|
||||
|
||||
### if and elif Statement
|
||||
|
||||
So let’s use our numerical comparison to introduce the _if_ statement. An _if_ statement in Bash will start with _if_ and end with _fi_. You start with the _if_ followed by the check you are wanting to do. In this case the check will be is variable _numberOne_ equal to 1. If _numberOne_ is equal to 1 it will execute the _then_ statement, otherwise it will execute the _else_ statement.
|
||||
|
||||
```
|
||||
|
||||
#!/bin/bash
|
||||
|
||||
numberTwelve=12
|
||||
|
||||
if [ $numberTwelve -eq 12 ]
|
||||
then
|
||||
echo "numberTwelve is equal to 12"
|
||||
elif [ $numberTwelve -gt 12 ]
|
||||
then
|
||||
echo "numberTwelve variable is greater than 12"
|
||||
else
|
||||
echo "neither of the statemens matched"
|
||||
fi
|
||||
|
||||
```
|
||||
|
||||
The output for that follows:
|
||||
|
||||
```
|
||||
|
||||
[zexcon@fedora ~]$ ./learnToScript.sh
|
||||
numberTwelve variable is equal to 12
|
||||
|
||||
```
|
||||
|
||||
What you are seeing is the first line in the _if_ statement checking to see if the variables value is really equal to 12. If it is the statement stops and echos “numberTwelve is equal to 12” and execution of your script will continue after the _fi._ If the variable was greater then 12 it would have executed the _elif_ statement and again continued execution after the _fi_. When you use an _if_ or _if/elif_ statement it works from the top down. When the first statement is a match it stops and executes that command and continues after the _fi_.
|
||||
|
||||
### String comparisons [[]]
|
||||
|
||||
So that was numeric comparisons. What about comparing strings? Uses the double square brackets [[]] and the following operators equal or not equal.
|
||||
|
||||
= (equal)
|
||||
|
||||
!= (not equal)
|
||||
|
||||
Keep in mind strings have several other comparisons that we will not discuss but dig in and read about them and how they work.
|
||||
|
||||
```
|
||||
|
||||
#!/bin/bash
|
||||
|
||||
#variable with a string
|
||||
stringItem="Hello"
|
||||
|
||||
#This will match since it is looking for an exact match with $stringItem
|
||||
if [[ $stringItem = "Hello" ]]
|
||||
then
|
||||
echo "The string is an exact match."
|
||||
else
|
||||
echo "The strings do not match exactly."
|
||||
fi
|
||||
|
||||
#This will utilize the then statement since it is not looking for a case sensitive match
|
||||
if [[ $stringItem = "hello" ]]
|
||||
then
|
||||
echo "The string does match but is not case sensitive."
|
||||
else
|
||||
echo "The string does not match because of the capitalized H."
|
||||
fi
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
You will get the following three lines.
|
||||
|
||||
```
|
||||
|
||||
[zexcon@fedora ~]$ ./learnToScript.sh
|
||||
The string is an exact match.
|
||||
The string does not match because of the capitalized H.
|
||||
[zexcon@fedora ~]$
|
||||
|
||||
```
|
||||
|
||||
### While Loop
|
||||
|
||||
Let’s take a look at a loop before wrapping up the series. An example of the _while_ loop is “while 1 is less then 10 add one to the value” you continue doing this until it is no longer true. Below you will see the variable _number_ set to 1. On the next line we have the _while_ statement that does a check to see if _number_ is less then or equal to 10. The commands contained between _do_ and _done_ are executed since the _while_ comparison is true. so we _echo_ some text and add one to the value of _number_. We continue until the _while_ statement is no longer true and it breaks out of the loop and echo’s “We have completed the while loop since $number is greater than 10.”
|
||||
|
||||
```
|
||||
|
||||
#!/bin/bash
|
||||
|
||||
number=1
|
||||
|
||||
while [ $number -le 10 ]
|
||||
do
|
||||
echo "We checked the current number is $number so we will increment once"
|
||||
((number=number+1))
|
||||
done
|
||||
echo "We have completed the while loop since $number is greater than 10."
|
||||
|
||||
```
|
||||
|
||||
The result of the _while_ loop is the following.
|
||||
|
||||
```
|
||||
|
||||
[zexcon@fedora ~]$ ./learnToScript.sh
|
||||
We checked the current number is 1 so we will increment once
|
||||
We checked the current number is 2 so we will increment once
|
||||
We checked the current number is 3 so we will increment once
|
||||
We checked the current number is 4 so we will increment once
|
||||
We checked the current number is 5 so we will increment once
|
||||
We checked the current number is 6 so we will increment once
|
||||
We checked the current number is 7 so we will increment once
|
||||
We checked the current number is 8 so we will increment once
|
||||
We checked the current number is 9 so we will increment once
|
||||
We checked the current number is 10 so we will increment once
|
||||
We have completed the while loop since 11 is greater than 10.
|
||||
[zexcon@fedora ~]$
|
||||
|
||||
```
|
||||
|
||||
As you can see the amount of scripting needed to make this happen is much less then if you continued to check each number with an _if_ statement. This is the great part of loops and the _while_ loop is only the first of many options that do things differently to meet your personal needs.
|
||||
|
||||
### Conclusion
|
||||
|
||||
What is next? As the article pointed out it’s Bash Shell Scripting for Beginners. Hopefully I sparked an interest or life long love for scripting. I recommend you check out other’s scripts and look up what you don’t know or understand. Remember that as each article presented more ways of doing math, comparing strings, outputting and imputing data they can also be done in functions, loops or numerous other ways. If you practice the basics discussed you will have a blast combining them with all the other options you are still going to learn. Go out and have fun and I’ll see you around the Fedora Linux world.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://fedoramagazine.org/bash-shell-scripting-for-beginners-part-3
|
||||
|
||||
作者:[Matthew Darnell][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://fedoramagazine.org/author/zexcon/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://fedoramagazine.org/wp-content/uploads/2021/11/bash_shell_scripting_pt3-816x345.jpg
|
||||
[2]: https://opensource.com/article/20/6/bash-functions
|
@ -1,414 +0,0 @@
|
||||
[#]: subject: "Vanilla Vim is fun"
|
||||
[#]: via: "https://opensource.com/article/21/12/vanilla-vim-config"
|
||||
[#]: author: "Lukáš Zapletal https://opensource.com/users/lzap"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Vanilla Vim is fun
|
||||
======
|
||||
Here's how I dropped from 35 Vim plugins to just six.
|
||||
![Person drinking a hot drink at the computer][1]
|
||||
|
||||
When you start Vim with the `--clean` option, it shows up in "vanilla" mode. No plugins, no configuration, just back to the roots. I have collected a ton of configuration statements over the years, some of them dating from MS-DOS or Windows 3.1. Here is the deal: I will start from scratch to find a good starting-point configuration with just the plugins available in Fedora 35. Will I survive a week of coding? I'll find out!
|
||||
|
||||
Here are the rules: Minimum possible configuration statements and only plugins which ship with Fedora 35+. By the way, if you are not a Fedora user, continue reading. You can always install these plugins from your OS package manager manually or using a Vim plugin manager.
|
||||
|
||||
Before I start, there's the elephant in the room: Vim or Neovim (fork of Vim) question. Well, this is up to you. Everything that is in this article should work for both. However, I only tested with Vim. All the skills will come in handy when you log on to a server where only `vi` is available. It can be either an old UNIX system, a Linux server with minimum software installed for better security, an interactive shell in a container, or an embedded system where space is precious.
|
||||
|
||||
Without further ado, here is what I distilled to the absolute bare minimum to be effective with Vim for coding:
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
# dnf install --allowerasing vim-default-editor \
|
||||
vim-enhanced \
|
||||
vim-ctrlp \
|
||||
vim-airline \
|
||||
vim-trailing-whitespace \
|
||||
vim-fugitive \
|
||||
vim-ale \
|
||||
ctags
|
||||
|
||||
```
|
||||
|
||||
Do not worry about the `--allowerasing` option. Just review the installation transaction before confirming. This option is there to tell the package manager to replace the existing package `nano-default-editor` with `vim-default-editor`. It is a small package that drops shell configuration files to set the EDITOR environment variable to `vim`, and this is a must-have if you want to use Vim (for example, with git). This is a special thing for Fedora. You will not need to do this on other distributions or OSes—just make sure your EDITOR shell variable is correctly set.
|
||||
|
||||
### Overview
|
||||
|
||||
A quick overview of what I consider a good and clean plugin set:
|
||||
|
||||
* **CtrlP**: Smallest possible fuzzy-finder plugin (pure vimscript)
|
||||
* **Fugitive**: A must-have tool for git
|
||||
* **Trailing-whitespace**: Shows and fixes, well, trailing whitespace
|
||||
* **Airline**: An improved status line (pure vimscript)
|
||||
* **Ale**: Highlights typos or syntax errors as you type
|
||||
* **Ctags**: Not a Vim plugin but a very much needed tool
|
||||
|
||||
|
||||
|
||||
There are other fuzzy-finder plugins like command-t or my favorite (very fast) `fzf.vim`. The thing is, `fzf.vim` is not in Fedora, and I want the smallest possible configuration. CtrlP will do just fine, and it is much easier to configure as it requires nothing.
|
||||
|
||||
If I were to choose an absolute minimum configuration it would be:
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
# cat ~/.vimrc
|
||||
let mapleader=","
|
||||
let maplocalleader="_"
|
||||
filetype plugin indent on
|
||||
let g:ctrlp_map = '<leader><leader>'
|
||||
let g:ctrlp_user_command = ['.git/', 'git --git-dir=%s/.git ls-files -oc --exclude-standard']
|
||||
set exrc
|
||||
set secure
|
||||
|
||||
```
|
||||
|
||||
But that is probably too extreme, so here is a slightly bigger configuration with my detailed explanation below:
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
" vim: nowrap sw=2 sts=2 ts=2 et:
|
||||
|
||||
" leaders
|
||||
let mapleader=","
|
||||
let maplocalleader="_"
|
||||
|
||||
" filetype and intent
|
||||
filetype plugin indent on
|
||||
|
||||
" incompatible plugins
|
||||
if has('syntax') && has('eval')
|
||||
packadd! matchit
|
||||
end
|
||||
|
||||
" be SSD friendly (can be dangerous!)
|
||||
"set directory=/tmp
|
||||
|
||||
" move backups away from projects
|
||||
set backupdir=~/.vimbackup
|
||||
|
||||
" fuzzy searching
|
||||
let g:ctrlp_map = '<leader><leader>'
|
||||
let g:ctrlp_user_command = ['.git/', 'git --git-dir=%s/.git ls-files -oc --exclude-standard']
|
||||
nnoremap <leader>b :CtrlPBuffer<cr>
|
||||
nnoremap <leader>t :CtrlPTag<cr>
|
||||
nnoremap <leader>f :CtrlPBufTag<cr>
|
||||
nnoremap <leader>q :CtrlPQuickfix<cr>
|
||||
nnoremap <leader>m :CtrlPMRU<cr>
|
||||
|
||||
" buffers and quickfix
|
||||
function! ToggleQuickFix()
|
||||
if empty(filter(getwininfo(), 'v:val.quickfix'))
|
||||
copen
|
||||
else
|
||||
cclose
|
||||
endif
|
||||
endfunction
|
||||
nnoremap <leader>w :call ToggleQuickFix()<cr>
|
||||
nnoremap <leader>d :bd<cr>
|
||||
|
||||
" searching ang grepping
|
||||
nnoremap <leader>g :copen<cr>:Ggrep!<SPACE>
|
||||
nnoremap K :Ggrep "\b<C-R><C-W>\b"<cr>:cw<cr>
|
||||
nnoremap <leader>s :set hlsearch! hlsearch?<cr>
|
||||
|
||||
" ctags generation
|
||||
nnoremap <leader>c :!ctags -R .<cr><cr>
|
||||
|
||||
" per-project configs
|
||||
set exrc
|
||||
set secure
|
||||
|
||||
```
|
||||
|
||||
### Using a comma for leader key
|
||||
|
||||
I like having my leader key mapped to a comma instead of the default backslash. It is the closest free key in Vim when your hands are in writing position. Also, this key is the same in most keyboard layouts while `\` varies per model or layout. I rarely use a local leader but underscore looks like a good fit.
|
||||
|
||||
Further reading:
|
||||
|
||||
* See `:help map-which-keys` in the [Vim Reference Manual][2]
|
||||
* See the unused keys in Vim on the [Vim Tips Wiki][3]
|
||||
|
||||
|
||||
|
||||
### Filetype and syntax off
|
||||
|
||||
Next up is the very important `filetype` command. See, Vim comes with "batteries included," version 8.2 contains syntax highlighting for 644 languages, 251 filetype definitions (`ftplugins`), and indentation rules for 138 languages. However, indentation is not enabled by default, perhaps to deliver a consistent editing experience for all. I like to enable it.
|
||||
|
||||
A quick tip: If you are editing a very large file and Vim feels slow, you may want to disable syntax highlighting to speed things up. Just the type `:syn off` command.
|
||||
|
||||
Further reading:
|
||||
|
||||
* See `:help filetype` in the [Vim Reference Manual][4]
|
||||
* See `:help syntax` in the [Vim Reference Manual][5]
|
||||
* See `:help indent` in the [Vim Reference Manual][6]
|
||||
|
||||
|
||||
|
||||
### Matchit plugin
|
||||
|
||||
Vim even comes with some extra plugins, which makes some features incompatible, one of these is quite useful. It is the `matchit` plugin that makes `%` key find matching parens to work with some languages. Typically, you can find the beginning or end of a block (begin and end) or HTML matching tags and similar.
|
||||
|
||||
Further reading:
|
||||
|
||||
* See `:help matchit` in the [Vim Reference Manual][7]
|
||||
|
||||
|
||||
|
||||
### Swap file
|
||||
|
||||
One of the many settings I want to keep from my old config is using `/tmp` for swap and creating backups in a separate directory in my home, which you need to create with `mkdir ~/.vimbackup`. It is important to understand that Vim creates a copy called "swap file" when you start editing, and all the unsaved work gets saved in this file. So even if there is a power outage, your swap contains most of the unsaved work. I prefer using `tmpfs` as all my laptops and servers are protected with UPS, and I save often. Also, most of the time, you use swap files when your SSH connection is lost rather than due to a power outage. Swap files can be quite big for large files and I value my SSD, so I am making the decision here. If you are unsure, remove this statement to use `/var/tmp`, which is safer.
|
||||
|
||||
Further reading:
|
||||
|
||||
* See `:help swap-file` in the [Vim Reference Manual][8]
|
||||
|
||||
|
||||
|
||||
### Fuzzy-finder plugin
|
||||
|
||||
Now, the fuzzy finder is a plugin I cannot live without. Opening files using commands like `:Ex` or `:e` or `:tabe` is okay on a server when you need to open like 20 files a day. When coding, I usually need to open hundreds of them. As I said, CtrlP does the job nicely. It is small, with no dependencies—pure Vim. It opens with the **Ctrl**+**P** combination, which is a bit weird to me. I know that some famous editors use it (VSCode, I think). The thing is, these are already important Vim keybindings that I do not want to override. So the winner for me is **leader**+**leader** (comma pressed twice).
|
||||
|
||||
The `ctrlp_user_command` just changes how CtrlP is getting the file list. Instead of the built-in recursive file lister (glob) it uses `git ls-files` which is usually better as it ignores things from `.gitignore`, so things like `node_modules` or other irrelevant directories that can slow down the listing are not in the way.
|
||||
|
||||
**Leader**+**B**/**T**/**F**/**Q**/**M** to open a list of buffers, tags, tags from the current file, quick fix buffer, and most recently used files is very useful. Specifically, once you generated a `taglist` with `ctags`, this is essentially "Go To Definition" for hundreds of programming languages—no plugins needed! This is all built-in in Vim. Now to put things straight, when I type **leader**+**B**, it means pressing comma and then pressing **B** key, not together like with **Control** or **Shift**.
|
||||
|
||||
Further reading:
|
||||
|
||||
* See `:help Explore` in the [Vim Reference Manual][9]
|
||||
* See the [ctrlp.vim GitHub][10]
|
||||
|
||||
|
||||
|
||||
### Buffer management
|
||||
|
||||
Although Vim supports tabs these days, buffer management is an important skill for mastering Vim. I usually end up with too many buffers and I need to do `:bdelete` way too often. Well, **leader**+**D** seems like a good option to do that faster. I also like to close the Quickfix window, so there is the **leader**+**W** combination for that too. I use this very often when browsing search results.
|
||||
|
||||
Further reading:
|
||||
|
||||
* See `:help buffer-hidden` in the [Vim Reference Manual][11]
|
||||
|
||||
|
||||
|
||||
### Ggrep and the fugitive plugin
|
||||
|
||||
Speaking about searching, it is as important as opening files. I want to be able to grep the codebase. For that, there is the awesome `:Ggrep` command from the fugitive plugin, which uses git grep, which ignores junk files and only searches what's in git. Since **Shift**+**K** is a free key in Vim, it is a great fit for automatically grepping the term under the cursor. And finally, being able to enter arbitrary search patterns using **leader**+**G** is also nice. Note this opens a window called the Quickfix window where you can navigate the results, go to next occurrence, previous, last, first, and more. The same window is used for output from compilators or other tools, so get familiar with it. I suggest further reading in the documentation if this is new to you.
|
||||
|
||||
Further reading:
|
||||
|
||||
* See `:help quickfix` in the [Vim Reference Manual][12]
|
||||
* See the [vim-fugitive GitHub][13]
|
||||
|
||||
|
||||
|
||||
### Searching and grepping with fugitive
|
||||
|
||||
By the way, searching with `/` key is smart and sensitive, meaning if all characters are lower case, Vim searches ignoring case. By default, it highlights results, and I think I typed `:noh` (turn of highlighting) about a million times. That's why I have **leader**+**S** to toggle this. I suggest reading more about searching in the manual later on too.
|
||||
|
||||
Searching and grepping are next. The fugitive plugin has you covered. Use the command `:Ggrep pattern` to do a git grep, and results will go into the Quickfix window. Then simply navigate through the results using quick fix commands (`:cn`, `:cp`, and such) or simply use `:CtrlPQuickfix` (or **leader**+**Q**) to scroll them visually. What is cool about the CtrlP quick fix integration is that you can further search the results by typing to match filenames or content if it makes sense—searching the search results.
|
||||
|
||||
Further reading:
|
||||
|
||||
* See `:help grep` in the [Vim Reference Manual][14]
|
||||
* See `:help noh` in the [Vim Reference Manual][15]
|
||||
* See the [vim-fugitive GitHub][13]
|
||||
|
||||
|
||||
|
||||
### Ctags
|
||||
|
||||
**Leader**+**C** to generate a `ctags` file for better navigation is useful when dealing with a new codebase or doing a longer coding session with lots of jumps around. Ctags supports hundreds of languages, and Vim can use all this knowledge to navigate it. More about how to configure it later. Note I already discussed **leader**+**T** to open fuzzy search for all tags, remember? It is the very same thing.
|
||||
|
||||
Further reading:
|
||||
|
||||
* See `:help ctags` in the [Vim Reference Manual][16]
|
||||
* See the [Universal Ctags website][17]
|
||||
|
||||
|
||||
|
||||
### Key mapping
|
||||
|
||||
Being able to override any other setting in projects by creating a `.vimrc` file in a project directory is a good idea. Just put it in the (global) `.gitignore` to ensure you don't need to edit thousands of git ignore files in each project. Such a project `.vimrc` could be something like (for C/C++ project with GNU Makefile):
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
" coding style
|
||||
set tabstop=4
|
||||
set softtabstop=4
|
||||
set shiftwidth=4
|
||||
set noexpandtab
|
||||
" include and autocomplete path
|
||||
let &path.="/usr/local/include"
|
||||
" function keys to build and run the project
|
||||
nnoremap <F9> :wall!<cr>:make!<cr><cr>
|
||||
nnoremap <F10> :!LD_LIBRARY_PATH=/usr/local/lib ./project<cr><cr>
|
||||
|
||||
```
|
||||
|
||||
As you can see, I typically map **F2**-**F10** keys to compile, run, test, and similar actions. Using **F9** for calling `make` sounds about right. Remember the blue Borland IDE from MS-DOS?
|
||||
|
||||
As mentioned earlier, it is a good idea to ignore both `.vimrc` and `tags` (generated by `ctags`) globally so there is no need to update every each `.gitignore`:
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
# git config --global core.excludesfile ~/.gitignore
|
||||
# cat ~/.gitignore
|
||||
/.vimrc
|
||||
/tags
|
||||
/TAGS
|
||||
|
||||
```
|
||||
|
||||
A few more statements in my personal config are only relevant for those with non-US keyboard layouts (I am on Czech). I need to use dead keys for many characters, and it is simply not possible, and I'd rather type the command instead of doing those hard-to-reach combinations. Here is a solution to the problem:
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
" CTRL-] is hard on my keyboard layout
|
||||
map <C-K> <C-]>
|
||||
" CTRL-^ is hard on my keyboard layout
|
||||
nnoremap <F1> :b#<cr>
|
||||
nnoremap <F2> :bp<cr>
|
||||
nnoremap <F3> :bn<cr>
|
||||
" I hate entering Ex mode by accident
|
||||
map Q <Nop>
|
||||
|
||||
```
|
||||
|
||||
Further reading:
|
||||
|
||||
* See `:help map` in the [Vim Reference Manual][18]
|
||||
|
||||
|
||||
|
||||
Function keys are all free in Vim, except **F1**, which is bound to help. I don't need help, not that I would already know everything about Vim. Not at all. But I can simply type `:help` if needed. And **F1** is a crucial key, so close to the **Esc** key. I like to use buffer swapping (`:b#`) for that and **F2**-**F3** for next/previous. The more you work with buffers, the more you will need this. If you haven't used **Ctrl**+**^**, I suggest getting used to it. Oh, have you ever entered the Ex mode with the ugly type `:visual`? Many beginners had no idea how to quit Vim from that mode. For me, it is just disturbing as I rarely use it.
|
||||
|
||||
Now, getting familiar with `ctags` is a key thing to be successful with Vim. This tool supports hundreds of languages and it can easily create tags for files you do not want to create, therefore I suggest ignoring typical junk directories:
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
# cat ~/.ctags.d/local.ctags
|
||||
\--recurse=yes
|
||||
\--exclude=.git
|
||||
\--exclude=build/
|
||||
\--exclude=.svn
|
||||
\--exclude=vendor/*
|
||||
\--exclude=node_modules/*
|
||||
\--exclude=public/webpack/*
|
||||
\--exclude=db/*
|
||||
\--exclude=log/*
|
||||
\--exclude=test/*
|
||||
\--exclude=tests/*
|
||||
\--exclude=\\*.min.\\*
|
||||
\--exclude=\\*.swp
|
||||
\--exclude=\\*.bak
|
||||
\--exclude=\\*.pyc
|
||||
\--exclude=\\*.class
|
||||
\--exclude=\\*.cache
|
||||
|
||||
```
|
||||
|
||||
### Airline plugin
|
||||
|
||||
I must not forget about the Vim airline plugin. Out of the two in Fedora, this one is light, no external dependencies are needed, and it works out of the box with all my fonts. You can customize it, and there are themes and such things. I just happen to like the default setting.
|
||||
|
||||
I must mention that there are two main `ctag` projects: Exuberant Ctags and Universal Ctags. The latter is a more modern fork. If your distribution has it, use that. If you are on Fedora 35+, you need to know that you are now on Universal Ctags.
|
||||
|
||||
### Wrap up
|
||||
|
||||
As I wrap it up, here is what I suggest. Try to keep your Vim configuration slick and clean. It will pay off in the future. After I switched, I had to re-learn the "write and quit" commands because I was typing it as `:Wq` accidentally all the time, and I had a "hack" in the old configuration that actually did what I meant. Okay, this one might be actually useful and make the cut—I hope you get what I mean:
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
:command Wq wq
|
||||
:command WQ wq
|
||||
|
||||
```
|
||||
|
||||
Here is a final quick tip: You may need to change your default Vim configuration a lot while finding the sweet spot of what I presented you here and your own taste. Use the following alias, so you don't need to search the history all the time. Trust me, when a Vim user searches history for "vim," nothing is relevant:
|
||||
|
||||
|
||||
```
|
||||
`alias vim-vimrc='vim ~/.vimrc'`
|
||||
```
|
||||
|
||||
There you have it. Maybe this can help you navigate through the rich world of Vim without a ton of plugins. _Vanilla_ Vim is fun!
|
||||
|
||||
To try out what you just read, install the packages and check out the config:
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
test -f ~/.vimrc && mv ~/.vimrc ~/.vimrc.backup
|
||||
curl -s <https://raw.githubusercontent.com/lzap/vim-lzap/master/.vimrc> -o ~/.vimrc
|
||||
mkdir ~/.vimbackup
|
||||
|
||||
```
|
||||
|
||||
Special thanks to Marc Deop and [Melanie Corr][19] for reviewing this article.
|
||||
|
||||
* * *
|
||||
|
||||
**Update:**
|
||||
|
||||
I've survived! The only struggle I had was the different order of results from the CtrlP plugin. The fuzzy algorithm for files is different from the `fzf.vim` plugin, so files that I used to find using various search terms do not work now. I ended up installing the fzf package from Fedora, which ships with a vim function FZF that can be bound to the leader combination for a more relevant file search. See the updated configuration file in my [GitHub repository][20]. I've learned a lot along the way. There are keybinding which I've already forgotten thanks to many plugins.
|
||||
|
||||
* * *
|
||||
|
||||
_This article originally appeared on the [author's website][21] and is republished with permission._
|
||||
|
||||
Vim offers great benefits to writers, regardless of whether they are technically minded or not.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/21/12/vanilla-vim-config
|
||||
|
||||
作者:[Lukáš Zapletal][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/lzap
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/coffee_tea_laptop_computer_work_desk.png?itok=D5yMx_Dr (Person drinking a hot drink at the computer)
|
||||
[2]: https://vimhelp.org/map.txt.html#map-which-keys
|
||||
[3]: https://vim.fandom.com/wiki/Unused_keys
|
||||
[4]: https://vimhelp.org/filetype.txt.html
|
||||
[5]: https://vimhelp.org/syntax.txt.html
|
||||
[6]: https://vimhelp.org/indent.txt.html
|
||||
[7]: https://vimhelp.org/usr_05.txt.html#matchit-install
|
||||
[8]: https://vimhelp.org/recover.txt.html#swap-file
|
||||
[9]: https://vimhelp.org/pi_netrw.txt.html#netrw-explore
|
||||
[10]: https://github.com/kien/ctrlp.vim
|
||||
[11]: https://vimhelp.org/windows.txt.html#buffer-hidden
|
||||
[12]: https://vimhelp.org/quickfix.txt.html
|
||||
[13]: https://github.com/tpope/vim-fugitive
|
||||
[14]: https://vimhelp.org/quickfix.txt.html#grep
|
||||
[15]: https://vimhelp.org/pattern.txt.html#noh
|
||||
[16]: https://vimhelp.org/tagsrch.txt.html
|
||||
[17]: https://ctags.io
|
||||
[18]: https://vimhelp.org/map.txt.html
|
||||
[19]: https://opensource.com/users/melanie-corr
|
||||
[20]: https://github.com/lzap
|
||||
[21]: https://lukas.zapletalovi.com/2021/11/a-sane-vim-configuration-for-fedora.html
|
@ -1,138 +0,0 @@
|
||||
[#]: subject: "Interesting KDE Facts and Trivia that You Should Know About"
|
||||
[#]: via: "https://www.debugpoint.com/2021/12/kde-facts-trivia/"
|
||||
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Interesting KDE Facts and Trivia that You Should Know About
|
||||
======
|
||||
WE LOOKED BACK IN TIME AND FOUND OUT SOME “KOOL” KDE FACTS AND TRIVIA.
|
||||
HERE IT IS.
|
||||
The KDE has a long history. How it was conceptualized, progressed and became a winner as a “go-to” desktop for all user base. In this post, we give you some interesting facts and trivia of KDE that you may be not aware of. And it’s good to know.
|
||||
|
||||
### KDE Facts and Trivia
|
||||
|
||||
#### The Beginning
|
||||
|
||||
KDE was created by [Matthias Ettrich][1] 20+ years ago. The main driving force was to create an easy to use desktop alternative to the [Common Desktop Environment (CDE)][2]. The idea was a simple desktop, fun to use, easy to configure and powerful. And KDE aka Kool Desktop Environment is born. You can notice the pun intended to CDE!. The “Kool” in the name is dropped, and eventually it became the “K Desktop Environment” aka KDE.
|
||||
|
||||
#### First Appearance
|
||||
|
||||
The official announcement of KDE Project by Matthias [still live][3] in Google Groups today at de.comp.os.linux.misc (Usenet). See below.
|
||||
|
||||
![KDE Facts and Trivia – The First Announcement][4]
|
||||
|
||||
Today, it is surreal to read the above idea and how much vision he had about KDE. And with that, where KDE Plasma is today, penetrating all the devices – Laptops, desktops, Game consoles, mobile phones. It is remarkable, indeed.
|
||||
|
||||
#### First Code
|
||||
|
||||
The first code was written by Matthias for the window manager “kwm” and panel “kpanel”. The KConfig class of KDE becomes the first library written of this amazing desktop.
|
||||
|
||||
#### Trouble with Qt License
|
||||
|
||||
During that time, in Usenet boards, many opposed the Qt license on which KDE is being developed. Hence, Matthias and team fly to Oslo in February 1997 and a foundation agreement is signed between KDE and Trolltech (then owner of Qt foundation). This guarantees the [eternal free availability of Qt][5].
|
||||
|
||||
During the initial days, believe it or not, the money was very much needed to keep the development effort on going. The generous donations received by the team from O’Reilly, SUSE, Trolltech.
|
||||
|
||||
#### KDE 1.0 – The First Release
|
||||
|
||||
The first developer conference called [“KDE One”][6] organized in August/September 1997 to discuss the vision, future and roadmap of the first KDE release. And that resulted in the first ever release of KDE 1.0 on 12th July 1998.
|
||||
|
||||
The KDE 1.0 is built on Qt 1.0 and written mostly in C++. In my opinion, it still looks stunning today. You can imagine, how advanced the vision was in terms of UI, user interaction and most importantly – a perfect Linux desktop for the masses.
|
||||
|
||||
![K Desktop Environment 1.0][7]
|
||||
|
||||
#### KDE 2.0
|
||||
|
||||
On October 23, 2000 – KDE 2.0 is released. It introduced a set of new applications for the first time that included Konqueror web browser, KOffice, Theme support, KParts, etc.
|
||||
|
||||
#### Initial Awards
|
||||
|
||||
On August 29, 2001 – KDE Awarded as “Best Open Source Project” at LinuxWorldExpo and receives the “Open Source Product Excellence” award.
|
||||
|
||||
[][8]
|
||||
|
||||
SEE ALSO: KaOS - Lean KDE Distribution Brings Latest Release
|
||||
|
||||
The [one millionth commit][9] has been made on the source code in the SVN On July 20, 2009. It was indeed a milestone for an open source project, paving the way for a promising future.
|
||||
|
||||
![Snippet of the Millionth Commit in KDE Source Code][10]
|
||||
|
||||
#### Fast Forward to Plasma 5.0
|
||||
|
||||
The KDE Software Compilation was used until KDE 4.0. It is split into three independent projects – KDE Framework, KDE Plasma and KDE Applications in the next Plasma 5.0 release. This helps the KDE Plasma desktop itself independent of the release standpoint with KDE Framework and KDE Applications. This modular approach helped the team to maintain the quality and progress of the entire ecosystem separately.
|
||||
|
||||
#### KDE Woman
|
||||
|
||||
The KDE Community’s Woman group [“KDE Women”][11] was created in March 2001 with a goal to increase women headcounts in free software communities, specially in KDE – across development, documentation and testing.
|
||||
|
||||
#### KDE Mascots
|
||||
|
||||
KDE’s official mascot is [Konqi][12] which is a nice little friendly dragon. It means Konqi the Konqueror. Katie is Konqi’s girlfriend and official mascot for KDE Project.
|
||||
|
||||
> Konqi is the current ambassador of KDEValley. He is good at building things as well as breaking things, and his reptilian brain cannot keep things tracked when they get really complicated. He travels around Flossland to establish connections between dragon colonies. He also brings messages to Userland across the Professional Ocean. He sometimes has these dreams of being a powerful big dragon, too. Was it his past life?
|
||||
>
|
||||
> Official description about Konqi
|
||||
|
||||
![Konqi – The Official KDE Mascot][13]
|
||||
|
||||
#### KDE’s journey to more devices and a promising future
|
||||
|
||||
Over the years, KDE Plasma became the choice of preferred desktop for a wide range of hardware. In 2016 KDE partnered with a Spanish laptop company and launched KDE Slimbook. [KDE Slimbook][14] is an Ultrabook with KDE Neon Edition featuring KDE Plasma, KDE Application pre-installed. It can be purchased from their website.
|
||||
|
||||
Linux mobile pioneer Pine64 launched [PinePhone KDE Edition][15] on 2020 which features KDE Plasma Mobile edition.
|
||||
|
||||
Valve corporation announced their handheld gaming console Steam Deck with [KDE Plasma][16] running on [Arch Linux][17].
|
||||
|
||||
![Slimbook 1][18]
|
||||
|
||||
### Wrapping Up
|
||||
|
||||
So, that’s about it. Some interesting facts and trivia of KDE which you may be not aware of. From the day of KDE 1.0 to today in a simple yet powerful handheld gaming device that is powered by KDE. A long and eventful journey, indeed. I’m sure, many more such exiting events are bound to happen in coming days with KDE ecosystem.
|
||||
|
||||
Do you know any interesting KDE facts that are not listed here? Let me know in the comment box below.
|
||||
|
||||
* * *
|
||||
|
||||
We bring the latest tech, software news and stuff that matters. Stay in touch via [Telegram][19], [Twitter][20], [YouTube][21], and [Facebook][22] and never miss an update!
|
||||
|
||||
##### Also Read
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.debugpoint.com/2021/12/kde-facts-trivia/
|
||||
|
||||
作者:[Arindam][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.debugpoint.com/author/admin1/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://en.wikipedia.org/wiki/Matthias_Ettrich
|
||||
[2]: https://sourceforge.net/projects/cdesktopenv/
|
||||
[3]: https://groups.google.com/g/de.comp.os.linux.misc/c/SDbiV3Iat_s/m/zv_D_2ctS8sJ
|
||||
[4]: https://www.debugpoint.com/wp-content/uploads/2021/12/KDE-Facts-and-Trivia-The-First-Announcement-1024x528.jpg
|
||||
[5]: https://dot.kde.org/2016/01/13/qt-guaranteed-stay-free-and-open-%E2%80%93-legal-update
|
||||
[6]: https://community.kde.org/KDE_Project_History/KDE_One_(Developer_Meeting)
|
||||
[7]: https://www.debugpoint.com/wp-content/uploads/2021/12/K-Desktop-Environment-1.0.jpg
|
||||
[8]: https://www.debugpoint.com/2020/07/kaos-2020-07-release/
|
||||
[9]: https://marc.info/?l=kde-commits&m=124811211002267&w=2
|
||||
[10]: https://www.debugpoint.com/wp-content/uploads/2021/12/Snippet-of-the-Millionth-Commit-in-KDE-Source-Code.jpg
|
||||
[11]: https://community.kde.org/KDE_Women
|
||||
[12]: https://community.kde.org/Konqi
|
||||
[13]: https://www.debugpoint.com/wp-content/uploads/2021/12/Konqi-The-Official-KDE-Mascot.jpg
|
||||
[14]: https://kde.slimbook.es/
|
||||
[15]: https://www.debugpoint.com/2020/11/pinephone-kde-community-edition-plasma-mobile/
|
||||
[16]: https://www.debugpoint.com/tag/kde-plasma
|
||||
[17]: https://www.debugpoint.com/tag/arch-linux
|
||||
[18]: https://www.debugpoint.com/wp-content/uploads/2020/07/Slimbook-1-1024x576.jpg
|
||||
[19]: https://t.me/debugpoint
|
||||
[20]: https://twitter.com/DebugPoint
|
||||
[21]: https://www.youtube.com/c/debugpoint?sub_confirmation=1
|
||||
[22]: https://facebook.com/DebugPoint
|
@ -1,414 +0,0 @@
|
||||
[#]: subject: "10 Best Apps to Improve Your GNOME Experience [Part 1]"
|
||||
[#]: via: "https://www.debugpoint.com/2021/12/best-gnome-apps-part-1/"
|
||||
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
10 Best Apps to Improve Your GNOME Experience [Part 1]
|
||||
======
|
||||
WE GIVE YOU DETAILS ABOUT THE 10 BEST GNOME APPS THAT CAN HELP YOU WORK
|
||||
SEAMLESSLY IN THIS AMAZING DESKTOP.
|
||||
There are hundreds of GTK based apps out there. And they are unknown, not so popular. These apps are designed to streamline your GNOME desktop experience with native app feel. The purpose of this article series is to improve popularity of those apps while encouraging more user participation ad development.
|
||||
|
||||
In this article series of ‘Best GNOME Apps’, we will highlight some known, unknown native GTK based Apps that are exclusively designed for GNOME across functionality.
|
||||
|
||||
. Other parts are available in below links:
|
||||
|
||||
* [Part 2][1]
|
||||
* [Part 3][2]
|
||||
* [Part 4][3]
|
||||
|
||||
|
||||
|
||||
In this article, we covered the following GNOME Apps.
|
||||
|
||||
* [Geary][4] – Email Client
|
||||
* [Notejot][5] – Easy Notes
|
||||
* [Hydrapaper][6] – Wallpaper for Multi Monitor Displays
|
||||
* [Solanum][7] – Pomodoro Client
|
||||
* [Cawbird][8] – Twitter Client
|
||||
* [News Flash][9] – RSS Reader
|
||||
* [Fragments][10] – Torrent Client
|
||||
* [MetadataCleaner][11] – Clean metadata from various files
|
||||
* [Kooha][12] – Screen Recorder
|
||||
* [Metronome][13] – Repeat Beats
|
||||
|
||||
|
||||
|
||||
### 10 Best GNOME Apps – Part 1
|
||||
|
||||
#### Geary – Email Client
|
||||
|
||||
When you think about [native email clients in Linux desktop][14], the default name that everyone considers is Thunderbird. However, if you want a more native feel in an email client, then you can try Geary. Geary is a GTK+ based email client that brings you features such as conversation view, mail merge, easy setup with just two steps, support for IMAP, SMTP, rich text editor for composing emails and many cool features.
|
||||
|
||||
You can easily configure this as your default email client with major email service providers such as Gmail, Yahoo, Outlook with option for custom configurations.
|
||||
|
||||
![Geary Email Client for GNOME][15]
|
||||
|
||||
Here’s how you can try it out.
|
||||
|
||||
Geary is available in major Linux Distribution’s official repo. You can search with ‘Geary’ to install. Or, via terminal:
|
||||
|
||||
```
|
||||
|
||||
sudo apt install geary
|
||||
|
||||
```
|
||||
|
||||
```
|
||||
|
||||
sudo dnf install geary
|
||||
|
||||
```
|
||||
|
||||
I would recommend to use Flatpak of this application, which you can install using following methods.
|
||||
|
||||
* Make sure to set up Flatpak via [this method][16]. And then –
|
||||
* [Install via Flathub][17]
|
||||
|
||||
|
||||
* [Home page][18]
|
||||
* [Source Code][19]
|
||||
|
||||
|
||||
|
||||
#### Notejot – Easy Notes
|
||||
|
||||
Want a “stupidly simple” note-taking app for GNOME? Then Notejot is the app that you are looking. This nifty note-taking apps look excellent with its intuitive one window UI that is carefully crafted. This app brings features such as multiple notes, notebook features, color notes, standard text formatting, etc. A perfect little GNOME application for note-taking.
|
||||
|
||||
![Stupidly Simple Note-Taking App – Notejot][20]
|
||||
|
||||
Try this app as Flatpak standalone package using the below methods.
|
||||
|
||||
* Make sure to set up Flatpak via [this method][16]. And then –
|
||||
* [Install via Flathub][17]
|
||||
|
||||
|
||||
* [Source code][21]
|
||||
|
||||
|
||||
|
||||
#### Hydrapaper – Wallpaper Changer for Multi Monitor Displays
|
||||
|
||||
This GTK application is a lifesaver for those uses multiple monitors. When you connect multiple displays to a single source system, the same wallpaper is shown in all the monitors. But if you want different pictures in those monitors, then you can use this app called Hydrapaper. This GTK app, well integrates with GNOME Desktop and gives you features such as –
|
||||
|
||||
* Preview of displays with their ID and what is displayed on them
|
||||
* Add your pictures folder and browse inside the app
|
||||
* Favorite option to quickly pick your favorite one
|
||||
* Five wallpaper modes – (Zoom, Fit/Center with black background, Fit/Center with blur background)
|
||||
* Random wallpaper mode
|
||||
* Command line option to extend it via scripting
|
||||
|
||||
|
||||
|
||||
![Hydrapaper – Wallpaper for Multiple Screens][22]
|
||||
|
||||
This is how to install this app.
|
||||
|
||||
This app is available in major Linux distribution’s repo. You can use the below methods.
|
||||
|
||||
```
|
||||
|
||||
sudo apt install hydrapaper (for Debian/Ubuntu)
|
||||
|
||||
```
|
||||
|
||||
```
|
||||
|
||||
sudo dnf install hydrapaper (for Fedora and related)
|
||||
|
||||
```
|
||||
|
||||
Arch users can install it via AUR after [setting up yay][23] –
|
||||
|
||||
```
|
||||
|
||||
yay -S hydrapaper-git
|
||||
|
||||
```
|
||||
|
||||
You can also install using Flatpak package after setting u[p Flatpak][16] –
|
||||
|
||||
[Install via Flathub][24]
|
||||
|
||||
* [Home Page][25]
|
||||
* [Source Code][26]
|
||||
|
||||
|
||||
|
||||
#### Solanum – Pomodoro Client
|
||||
|
||||
The next GNOME app is called Solanum which is a time tracking application based on [Pomodoro technique.][27] The technique is to break the time you have in 25-minute chunk separated by 5 minutes break – which is called one Pomodoro. After 4 pomodoro, you can take a longer break.
|
||||
|
||||
This app helps you to do just that. Solanum has a very simple UI that shows the Pomodoro in a Lap with a timer. The Start stop toggle button helps you to manage your time. This is a very useful utility, specially if you face difficulties on managing time.
|
||||
|
||||
![Solanum][28]
|
||||
|
||||
Here’s how to get it.
|
||||
|
||||
You can install Solanum using Flatpak package after [set up][16] –
|
||||
|
||||
[Install as Flatpak][29]
|
||||
|
||||
More details about this app –
|
||||
|
||||
* [Home page][30]
|
||||
* [Source code][31]
|
||||
|
||||
|
||||
|
||||
#### Cawbird – Twitter Client
|
||||
|
||||
[Cawbird][32] is a GTK based twitter client for GNOME desktops. It is a fork of [Corebird][33] which was discontinued after Twitter API changes. This app is perfect for your GNOME desktop and have all the features of Twitter web. Resource wise, it is lightweight. If you are a heavy Twitter user, then you can give the app a try.
|
||||
|
||||
![Cawbird – A Native GNOME App for Twitter][34]
|
||||
|
||||
Here are the installation steps.
|
||||
|
||||
Cawbird is available for all Major Linux distributions. You can find the packages and commands below for installation.
|
||||
|
||||
[Ubuntu/Debian – pre-compiled DEB packages from OpenSUSE][35]
|
||||
|
||||
```
|
||||
|
||||
sudo dnf install cawbird (for Fedora and related)
|
||||
|
||||
```
|
||||
|
||||
For Arch Linux you can get it via –
|
||||
|
||||
```
|
||||
|
||||
pacman -Syu cawbird
|
||||
|
||||
```
|
||||
|
||||
[Install as Flatpak][36]
|
||||
|
||||
[][1]
|
||||
|
||||
SEE ALSO: 10 Perfect Apps to Improve Your GNOME Experience [Part 2]
|
||||
|
||||
[Install as Snap][37]
|
||||
|
||||
* [Home page][32]
|
||||
* [Source Code][38]
|
||||
|
||||
|
||||
|
||||
#### News Flash – RSS Reader
|
||||
|
||||
The News Flash is one of the best GNOME app for reading RSS feeds from your favorite websites. This application is perfect for your GNOME desktop because of the features it provides. It gives you popup notifications for your new feeds, unread feeds, support dark mode, etc. Here’s a quick summary of its features.
|
||||
|
||||
Perhaps the most exciting feature is the ability to read the article directly inside the app itself – even if the feed doesn’t provide the entire article. It tries to fetch the text from the URL and display it in the app window (without images).
|
||||
|
||||
* Support for popular feed integration
|
||||
* Import and export of feeds with OPML
|
||||
* Dark mode support
|
||||
* Reader mode
|
||||
* Bookmark, search, export article options
|
||||
* Gives you details about how much disk space used in the settings by the app to store the feeds.
|
||||
|
||||
|
||||
|
||||
![News Flash – One of the best GNOME App for Managing Feeds][39]
|
||||
|
||||
Interested? Here’s how to install.
|
||||
|
||||
Install as a Flatpak package after [initial setup][16] –
|
||||
|
||||
[Install via Flathub][40]
|
||||
|
||||
If you are in Arch Linux, you can [set up Yay AUR Helper][23] and then use the following command to install –
|
||||
|
||||
```
|
||||
|
||||
yay -S newsflash
|
||||
|
||||
```
|
||||
|
||||
* [Home Page][41]
|
||||
* [Source Code][42]
|
||||
|
||||
|
||||
|
||||
#### Fragments – Torrent Client
|
||||
|
||||
Fragments is a simple BitTorrent desktop client built on GTK. Although we have Transmission as perfect torrent client which has separate UI for GTK and QT. But no harm on a far simpler Torrent client for GNOME desktop, right? Fragment has a simple interface, confirms to GNOME design guidelines and provides all the required features for a BitTorrent client. It supports magnet links as well.
|
||||
|
||||
![Fragments – Torrent Client for GNOME Desktop][43]
|
||||
|
||||
Here’s how to install.
|
||||
|
||||
Best way to install is using Flatpak after [setting up the Flathub repo][16].
|
||||
|
||||
[Install as Flatpak][44]
|
||||
|
||||
* [Home Page][45]
|
||||
* [Source Code][46]
|
||||
|
||||
|
||||
|
||||
#### MetadataCleaner – Clean metadata from various files
|
||||
|
||||
Ever ran into a situation where you need to remove certain information from a file, such as created by, or created via software name. For example, if you have an image created in GIMP, the file contains a default text (unless you remove it) ‘Created by GIMP’. Or, an image may contain location details, time stamp, camera information and so on. And removing such information requires some specific application with additional hassles.
|
||||
|
||||
MetedataCleaner application does just that. It helps you remove this information from files. When you open a file using this application, it reads and gives you a list of metadata. All you need to do is click the Clean button. And you have the cleaned file. Such a useful utility for GNOME.
|
||||
|
||||
![Metadata Cleaner][47]
|
||||
|
||||
Installation steps for this application present below.
|
||||
|
||||
Best way to install is using Flatpak after [setting up the Flathub repo][16].
|
||||
|
||||
[Install as Flatpak][48]
|
||||
|
||||
* [Home Page][49]
|
||||
* [Source Code][50]
|
||||
|
||||
|
||||
|
||||
#### Kooha – Screen Recorder
|
||||
|
||||
If you are looking for a fast and simple screen recorder for GNOME desktop, then try Kooha. This application is one of the best GNOME apps that provides hassle-free recording experiences. This utility supports hardware acceleration, timer, multiple sources as input and many advanced features. Here’s a summary:
|
||||
|
||||
* Option to select monitor for multiple display or any window
|
||||
* Hardware accelerated encoding
|
||||
* Option to record area of a screen
|
||||
* Record mic and computer sound together
|
||||
* Delay timer for records
|
||||
* Support for WebM, mp4, gif, mkv file types
|
||||
|
||||
|
||||
|
||||
![Kooha – Best Screen Recoder for GNOME][51]
|
||||
|
||||
Here’s how to install.
|
||||
|
||||
Best way to install is using Flatpak after [setting up the Flathub repo][16].
|
||||
|
||||
[Install as Flatpak][52]
|
||||
|
||||
* [Home Page][53]
|
||||
* [Source Code][54]
|
||||
|
||||
|
||||
|
||||
#### Metronome – Repeat Beats
|
||||
|
||||
The metronome, originally [an ancient device][55] which generates some audible short sound in a constant interval that beats per minute. This is useful for tasks where you need to maintain a consistent motion, activity and don’t lose focus to speed up or slow down.
|
||||
|
||||
So, this GNOME App called Metronome is a software version of the device which can help you to maintain your activity and focus. This is specially used by musicians to practice playing in a regular interval to be consistent.
|
||||
|
||||
![Metronome for GNOME][56]
|
||||
|
||||
Here’s how to install.
|
||||
|
||||
Best way to install is using Flatpak after [setting up the Flathub repo][16].
|
||||
|
||||
Then install via this [page][57].
|
||||
|
||||
* [Home Page][58]
|
||||
* [Source Code][59]
|
||||
|
||||
|
||||
|
||||
### Closing Notes
|
||||
|
||||
So, there you have it – the list of 10 best GNOME apps to extend your desktop experience. Not only GNOME, you can use them in KDE Plasma or Xfce or any other desktop – thanks to Flatpak. I hope these apps for GNOME desktop becomes more popular and usage increases.
|
||||
|
||||
What is your favorite GNOME App, let me know in the comment box below.
|
||||
|
||||
Read the other parts via the following links.
|
||||
|
||||
[Part 2][1]
|
||||
[Part 3][2]
|
||||
[Part 4][3]
|
||||
|
||||
_Some Image Credits: Respective GNOME Apps_
|
||||
|
||||
* * *
|
||||
|
||||
We bring the latest tech, software news and stuff that matters. Stay in touch via [Telegram][60], [Twitter][61], [YouTube][62], and [Facebook][63] and never miss an update!
|
||||
|
||||
##### Also Read
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.debugpoint.com/2021/12/best-gnome-apps-part-1/
|
||||
|
||||
作者:[Arindam][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.debugpoint.com/author/admin1/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.debugpoint.com/2021/12/best-gnome-apps-part-2/
|
||||
[2]: https://www.debugpoint.com/2022/01/best-gnome-apps-part-3/
|
||||
[3]: https://www.debugpoint.com/2022/02/best-gnome-apps-part-4/
|
||||
[4]: tmp.SdvbWYqKsq#geary
|
||||
[5]: tmp.SdvbWYqKsq#notejot
|
||||
[6]: tmp.SdvbWYqKsq#hydrapaper
|
||||
[7]: tmp.SdvbWYqKsq#solanum
|
||||
[8]: tmp.SdvbWYqKsq#cawbird
|
||||
[9]: tmp.SdvbWYqKsq#news-flash
|
||||
[10]: tmp.SdvbWYqKsq#fragments
|
||||
[11]: tmp.SdvbWYqKsq#metadata-cleaner
|
||||
[12]: tmp.SdvbWYqKsq#kooha
|
||||
[13]: tmp.SdvbWYqKsq#metronome
|
||||
[14]: https://www.debugpoint.com/2019/06/best-email-client-linux-windows/
|
||||
[15]: https://www.debugpoint.com/wp-content/uploads/2021/12/Geary-Email-Client-for-GNOME.jpg
|
||||
[16]: https://flatpak.org/setup/
|
||||
[17]: https://flathub.org/repo/appstream/org.gnome.Geary.flatpakref
|
||||
[18]: https://wiki.gnome.org/Apps/Geary
|
||||
[19]: https://gitlab.gnome.org/GNOME/geary
|
||||
[20]: https://www.debugpoint.com/wp-content/uploads/2021/12/Stupidly-Simple-Note-Taking-App-Notejot.jpg
|
||||
[21]: https://github.com/lainsce/notejot
|
||||
[22]: https://www.debugpoint.com/wp-content/uploads/2021/12/Hydrapaper-Wallpaper-for-Multiple-Screens-1024x689.jpg
|
||||
[23]: https://www.debugpoint.com/2021/01/install-yay-arch/
|
||||
[24]: https://flathub.org/apps/details/org.gabmus.hydrapaper
|
||||
[25]: https://hydrapaper.gabmus.org/
|
||||
[26]: https://gitlab.gnome.org/gabmus/hydrapaper
|
||||
[27]: https://en.wikipedia.org/wiki/Pomodoro_Technique
|
||||
[28]: https://www.debugpoint.com/wp-content/uploads/2021/12/Solanum.jpg
|
||||
[29]: https://dl.flathub.org/repo/appstream/org.gnome.Solanum.flatpakref
|
||||
[30]: https://apps.gnome.org/app/org.gnome.Solanum/
|
||||
[31]: https://gitlab.gnome.org/World/Solanum
|
||||
[32]: https://ibboard.co.uk/cawbird/
|
||||
[33]: https://corebird.baedert.org/
|
||||
[34]: https://www.debugpoint.com/wp-content/uploads/2021/12/Cawbird-A-Native-GNOME-App-for-Twitter.jpg
|
||||
[35]: https://software.opensuse.org//download.html?project=home%3AIBBoard%3Acawbird&package=cawbird
|
||||
[36]: https://flathub.org/apps/details/uk.co.ibboard.cawbird
|
||||
[37]: https://snapcraft.io/cawbird
|
||||
[38]: https://github.com/IBBoard/cawbird
|
||||
[39]: https://www.debugpoint.com/wp-content/uploads/2021/12/News-Flash-One-of-the-best-GNOME-App-for-Managing-Feeds-1024x618.jpg
|
||||
[40]: https://flathub.org/apps/details/com.gitlab.newsflash
|
||||
[41]: https://apps.gnome.org/app/com.gitlab.newsflash/
|
||||
[42]: https://gitlab.com/news-flash/news_flash_gtk
|
||||
[43]: https://www.debugpoint.com/wp-content/uploads/2021/12/Fragments-Torrent-Client-for-GNOME-Desktop.jpg
|
||||
[44]: https://flathub.org/apps/details/de.haeckerfelix.Fragments
|
||||
[45]: https://apps.gnome.org/app/de.haeckerfelix.Fragments/
|
||||
[46]: https://gitlab.gnome.org/World/Fragments
|
||||
[47]: https://www.debugpoint.com/wp-content/uploads/2021/12/Metadata-Cleaner.jpg
|
||||
[48]: https://flathub.org/apps/details/fr.romainvigier.MetadataCleaner
|
||||
[49]: https://metadatacleaner.romainvigier.fr/
|
||||
[50]: https://gitlab.com/rmnvgr/metadata-cleaner/
|
||||
[51]: https://www.debugpoint.com/wp-content/uploads/2021/12/Kooha-Best-Screen-Recoder-for-GNOME.jpg
|
||||
[52]: https://flathub.org/apps/details/io.github.seadve.Kooha
|
||||
[53]: https://apps.gnome.org/app/io.github.seadve.Kooha/
|
||||
[54]: https://github.com/SeaDve/Kooha
|
||||
[55]: https://en.wikipedia.org/wiki/Metronome
|
||||
[56]: https://www.debugpoint.com/wp-content/uploads/2021/12/Metronome-for-GNOME.jpg
|
||||
[57]: https://flathub.org/apps/details/com.adrienplazas.Metronome
|
||||
[58]: https://apps.gnome.org/app/com.adrienplazas.Metronome/
|
||||
[59]: https://gitlab.gnome.org/World/metronome
|
||||
[60]: https://t.me/debugpoint
|
||||
[61]: https://twitter.com/DebugPoint
|
||||
[62]: https://www.youtube.com/c/debugpoint?sub_confirmation=1
|
||||
[63]: https://facebook.com/DebugPoint
|
@ -1,87 +0,0 @@
|
||||
[#]: subject: "13 examples of how DevOps facilitated transformation in 2021"
|
||||
[#]: via: "https://opensource.com/article/22/1/devops-transformation"
|
||||
[#]: author: "Will Kelly https://opensource.com/users/willkelly"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "CN-QUAN "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
13 examples of how DevOps facilitated transformation in 2021
|
||||
======
|
||||
In 2021, Opensource.com's top DevOps articles focused on tools, best
|
||||
practices, and the most crucial part: transformation.
|
||||
![Tips and gears turning][1]
|
||||
|
||||
2021 has been an exciting year for DevOps as teams continue to adjust to remote and hybrid working models. The DevOps articles that made our most-read list this year show how our community focuses on tools, innovation, best practices, and transformation.
|
||||
|
||||
### DevOps tools and innovation
|
||||
|
||||
Tools of the trade continue to rank as a top read for Opensource.com readers. [Nimisha Mukherjee][2], an engineering manager with Red Hat, wrote [13 open source tools for developers][3]. She breaks tools down by _Inner loop_, the most common tasks developers do, and _Outer loop_, where the developers' code goes through continuous integration and delivery (CI/CD) for deployment to production.
|
||||
|
||||
Implementing a DevOps toolchain also ranked high on our reader's interests. A first-time contributor, [Tereza Denkova][4], Marketing Associate at Accedia, an IT professional services company, wrote [How to implement a DevOps toolchain][5] and eloquently tied it to innovation.
|
||||
|
||||
### DevOps practices
|
||||
|
||||
[Daniel Oh][6], a major champion for Opensource.com and a prolific content creator in his own right, wrote [3 serverless strategies to look for in 2021][7], giving an overview of how serverless application development and deployment approaches are accelerating the adoption of DevApps practices today.
|
||||
|
||||
[Evan "Hippy" Slatis][8] offers strategies for aligning deployment images and descriptors in his article [Solve the repository impedance mismatch in CI/CD][9]. He's a senior consultant for Red Hat, and the methodical approach he takes in his article testifies to his industry experience. Also, check out his article entitled [Processing modular and dynamic configuration files in shell][10].
|
||||
|
||||
In my article [A DevOps guide to documentation][11], I made a case for documentation to become part of the DevOps discussion. I got some insightful comments from readers that I'm in the process of following up on for a future article.
|
||||
|
||||
### DevOps transformation
|
||||
|
||||
We sometimes don't give DevOps credit for its ability to adapt to organizational needs. It's essential to understand the potential impact of other forms of Ops that may supplement or augment DevOps now or in the future. [Bryant Son][12], a self-described Octocat, makes the case that GitOps is an evolved form of DevOps in [GitOps vs. DevOps: What's the difference?][13]
|
||||
|
||||
[Mike Calizo][14], a Red Hat solutions architect based in Auckland, New Zealand, wrote [How to adopt DevSecOps successfully][15]. His experience as a solutions architect shines through in this article. He explains some of the adoption and security challenges you might face in your move to DevSecOps.
|
||||
|
||||
I wrote a series of articles about DevOps to DevSecOps transformation that made the list. Here they are:
|
||||
|
||||
* [Launching a DevOps to DevSecOps transformation][16]
|
||||
* [3 phases to start a DevSecOps transformation][17]
|
||||
* [Following a DevSecOps maturity model][18]
|
||||
* [3 more phases of DevSecOps transformation][19]
|
||||
* [4 steps to make DevSecOps adoption a team effort][20]
|
||||
|
||||
|
||||
|
||||
### 2022 and the future of DevOps
|
||||
|
||||
Seeing the DevOps articles that made the most-read list for 2021 speaks to an even more interesting 2022 for DevOps as organizations continue to master their tools, improve their strategies, and continue their [digital transformation][21] to compete effectively in an ever-changing marketplace.
|
||||
|
||||
Thank you to everyone who read our DevOps articles, liked them, and sent us comments via the site and social media.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/1/devops-transformation
|
||||
|
||||
作者:[Will Kelly][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/willkelly
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/gears_devops_learn_troubleshooting_lightbulb_tips_520.png?itok=HcN38NOk (Tips and gears turning)
|
||||
[2]: https://opensource.com/users/nimisha
|
||||
[3]: https://opensource.com/article/21/6/open-source-developer-tools
|
||||
[4]: https://opensource.com/users/tereza-denkova
|
||||
[5]: https://opensource.com/article/21/1/devops-tool-chain
|
||||
[6]: https://opensource.com/users/daniel-oh
|
||||
[7]: https://opensource.com/article/21/1/devapps-strategies
|
||||
[8]: https://opensource.com/users/hippyod
|
||||
[9]: https://opensource.com/article/21/8/impedance-mismatch-cicd
|
||||
[10]: https://opensource.com/article/21/5/processing-configuration-files-shell
|
||||
[11]: https://opensource.com/article/21/3/devops-documentation
|
||||
[12]: https://opensource.com/users/brson
|
||||
[13]: http://opensource.com/article/21/3/gitops
|
||||
[14]: https://opensource.com/users/mcalizo
|
||||
[15]: https://opensource.com/article/21/2/devsecops
|
||||
[16]: http://opensource.com/article/21/10/devops-to-devsecops
|
||||
[17]: https://opensource.com/article/21/10/first-phases-devsecops-transformation
|
||||
[18]: https://opensource.com/article/21/10/devsecops-maturity-model
|
||||
[19]: https://opensource.com/article/21/10/last-phases-devsecops-transformation
|
||||
[20]: https://opensource.com/article/21/10/devsecops-team-effort
|
||||
[21]: https://enterprisersproject.com/what-is-digital-transformation
|
@ -1,370 +0,0 @@
|
||||
[#]: subject: "10 Perfect Apps to Improve Your GNOME Experience [Part 2]"
|
||||
[#]: via: "https://www.debugpoint.com/2021/12/best-gnome-apps-part-2/"
|
||||
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
10 Perfect Apps to Improve Your GNOME Experience [Part 2]
|
||||
======
|
||||
HERE ARE THE NEXT SET OF GNOME APPS THAT IS PERFECT FOR YOUR GNOME
|
||||
DESKTOP. IT RANGES FROM GAMES, UTILITIES AND PRODUCTIVITY.
|
||||
There are many native GNOME Apps scattered around which are completely unknown to the users. They are surprisingly good and does its job perfectly. The discovery of those apps are not streamlined via GNOME’s own app store. Because, the GNOME App website doesn’t list them all.
|
||||
|
||||
That said, we are continuing a GNOME Apps discovery series to make those apps become popular. Being popular is a good way to increase visibility, contributions from community. And obviously the quality of those apps gets improved because more bugs are reported and fixed.
|
||||
|
||||
In this article series of ‘’, we will highlight some known, unknown native GTK based Apps that are exclusively designed for GNOME across functionality.
|
||||
|
||||
This is part 2 of the 5 part series. In case you have landed here from other references, you can read the other parts via following links.
|
||||
|
||||
* [Part 1][1]
|
||||
* [Part 3][2]
|
||||
* [Part 4][3]
|
||||
|
||||
|
||||
|
||||
In this article, we covered the following list of perfect GNOME Apps.
|
||||
|
||||
* [Flatseal][4] – Managing Flatpak App Permissions
|
||||
* [Junction][5] – Choose Apps to open files/links on the fly
|
||||
* [Blanket][6] – Improve productivity
|
||||
* [Mousai][7] – Discover Music (like Shazam)
|
||||
* [Shortwave][8] – Internet Radio
|
||||
* [Health][9] – Health parameter tracker
|
||||
* [Dialect][10] – Translation app for GNOME
|
||||
* [Video Trimmer][11] – A superfast video cutter
|
||||
* [Console][12] – A New Minimal GNOME Terminal
|
||||
* [GNOME Crossword][13] – A crossword game
|
||||
|
||||
|
||||
|
||||
### Perfect and Best GNOME Apps – Part 2
|
||||
|
||||
#### Flatseal – Managing Flatpak App Permissions
|
||||
|
||||
This GNOME App is perfect for heavy users of Flatpak Apps. The Flatpak apps runs in sandbox mode by design. That means, they do not have access to the host system components by default. For example, one Flatpak app may not have access to your Wi-Fi, Or, home directory. But what if an app gives you a nice GUI to manage all the accesses for installed Flatpak apps?
|
||||
|
||||
Flatseal does just that. It lists your installed Flatpak apps and gives you nice UI to grant or remove access to all the flatpak apps. This easy to use app is a must-have if you are using GNOME Desktop.
|
||||
|
||||
Here’s how it looks and installation steps.
|
||||
|
||||
![Flatseal Showing list of apps and their permissions][14]
|
||||
|
||||
[Setup Flatpak][15] for your Linux distribution. And then click on the below button to launch the native software manager to install (such as Software or Discover).
|
||||
|
||||
[Install Flatseal via Flathub repo][16]
|
||||
|
||||
* [Source code and development][17]
|
||||
* [Documentation][18]
|
||||
|
||||
|
||||
|
||||
#### Junction – Choose Apps to open files/links on the fly
|
||||
|
||||
The next app is an extended version of “Open With” functionality of files. Usually, each file extension are tied to a specific program to open them in the OS itself. You can change it always from Settings in GNOME. For example, .txt (text) files always open via Gedit.
|
||||
|
||||
When you use this app called Junction, and try to open any link or file, it would pop up a separate menu with icons of applications to open the link or file with.
|
||||
|
||||
For example, if you try to open a PNG file, it will give you options to open that image file with all available graphics applications installed in your operating system.
|
||||
|
||||
![Junction GNOME App showing options as app to open an image][19]
|
||||
|
||||
Interested? Here’s how to install.
|
||||
|
||||
[Setup Flatpak][15] for your Linux distribution. And then click on the below button to launch the native software manager to install (such as Software or Discover).
|
||||
|
||||
[Install Junction via Flathub][20]
|
||||
|
||||
* [Home page][21]
|
||||
* [Source code][22]
|
||||
|
||||
|
||||
|
||||
#### Blanket – Increase your focus and productivity
|
||||
|
||||
This is my favorite app for GNOME desktop. Want to listen to rain sound? Or bird singing? Waves? Those natures sounds helps to concentrate, increases your focus. Even those helps you to work or fall asleep in noisy environment.
|
||||
|
||||
This app – Blanket comes with preloaded with such sounds. All you need is install and hit play to enjoy calm and serene music.
|
||||
|
||||
By default, it gives you plenty to choose from:
|
||||
|
||||
* Rain
|
||||
* Storm
|
||||
* Wind
|
||||
* Waves
|
||||
* stream
|
||||
* Birds
|
||||
* Summer Night
|
||||
* Train
|
||||
* Boat
|
||||
* City
|
||||
* Coffee Shop
|
||||
* Fireplace
|
||||
* Pink and White Noise
|
||||
|
||||
|
||||
|
||||
Oh, you can add your own custom music as well (mp3, wav, ogg) and play.
|
||||
|
||||
![Calm your mind using Blanket][23]
|
||||
|
||||
I’m sure you want to install this app. This is how you can install right now.
|
||||
|
||||
[Setup Flatpak][15] for your Linux distribution. And then click on the below button to launch the native software manager to install (such as Software or Discover).
|
||||
|
||||
[Install Blanket via Flathub][24]
|
||||
|
||||
Additional information about this perfect GNOME desktop app –
|
||||
|
||||
* [Source code][25]
|
||||
* [Home page][26]
|
||||
|
||||
|
||||
|
||||
#### Mousai – Discover Music (like Shazam)
|
||||
|
||||
I am sure you have heard about [Shazam][27] – the popular music recognition app for smartphones, tabs. The Mousai is a music identification app for GNOME desktop. It can listen and identify songs details on the fly. This app uses your system’s microphone or desktop line-out audio for input.
|
||||
|
||||
Pretty neat? Isn’t it? Here are some of its features:
|
||||
|
||||
* Easy to use UI – perfect for GNOME desktop
|
||||
* Identifies songs within seconds
|
||||
* Stores the identified songs in history for easy references
|
||||
* Browse the song info on the web from the app itself
|
||||
|
||||
|
||||
|
||||
![Mousai][28]
|
||||
|
||||
Before you hit install, remember this app uses API from popular [audd.io][29] for its functionality.
|
||||
|
||||
[Setup Flatpak][15] for your Linux distribution. And then click on the below button to launch the native software manager to install (such as Software or Discover).
|
||||
|
||||
[Install Mousai via Flathub][30]
|
||||
|
||||
Here are some additional information about this app –
|
||||
|
||||
* [Home page][31]
|
||||
* [Source code][32]
|
||||
|
||||
|
||||
|
||||
#### Shortwave – Internet Radio
|
||||
|
||||
If you are a Radio listener and a fan of radio stations, then the next GNOME app is for you. Shortwave is an internet radio station that seamlessly integrates with GNOME desktop. It is capable of accessing 25,000 radio stations across the world with its unique features such as –
|
||||
|
||||
* Browse stations
|
||||
* Searching stations
|
||||
* View by most voted stations
|
||||
* Get stations that other users listening to
|
||||
* Create your library with radio stations
|
||||
* Ability to play directly to network devices such as Google Chromecast from GNOME
|
||||
|
||||
|
||||
|
||||
![Shortwave App][33]
|
||||
|
||||
This radio streaming app is one of the perfect GNOME app available today with these impressive features. Here’s you can install and get into the groove.
|
||||
|
||||
[][34]
|
||||
|
||||
SEE ALSO: 10 Things to Do After Installing Fedora 33
|
||||
|
||||
[Setup Flatpak][15] for your Linux distribution. And then click on the below button to launch the native software manager to install (such as Software or Discover).
|
||||
|
||||
[Install Shortwave via Flathub][35]
|
||||
|
||||
More information about Shortwave –
|
||||
|
||||
* [Home page][36]
|
||||
* [Source code][37]
|
||||
|
||||
|
||||
|
||||
#### Health – Health parameter tracker
|
||||
|
||||
Want to get a track of your exercise and related activities right from the GNOME desktop? Then this app might be the one you are looking for. The Health app is able to track your steps, weight, calories and activities such as swimming, running etc.
|
||||
|
||||
This app gives you a nice UI to show you whether you are meeting your daily goal of total steps and so on.
|
||||
|
||||
![Health App][38]
|
||||
|
||||
Here’s how you can install this app.
|
||||
|
||||
[Setup Flatpak][15] for your Linux distribution. And then click on the below button to launch the native software manager to install (such as Software or Discover).
|
||||
|
||||
[Install Health via Flathub][39]
|
||||
|
||||
More information about Health app –
|
||||
|
||||
* [Home Page][40]
|
||||
* [Source Code][41]
|
||||
|
||||
|
||||
|
||||
#### Dialect – Translation app for GNOME
|
||||
|
||||
Looking for a native translation app that really works for GNOME? Then Dialect is the app you are looking for. Dialect is a perfect native GNOME app that can easily translate free texts from one language to another. This application uses an unofficial API for Google Translate and gives you the perfect translation. It also uses LibreTranslate API, which is a free and open source machine translation API that is available online.
|
||||
|
||||
Other unique features of Dialect includes text to speech, keeping a history of your translations, auto language detection and clipboard buttons in UI to name a few.
|
||||
|
||||
![Dialect][42]
|
||||
|
||||
Here’s how you can install it right now for your GNOME desktop.
|
||||
|
||||
[Setup Flatpak][15] for your Linux distribution. And then click on the below button to launch the native software manager to install (such as Software or Discover).
|
||||
|
||||
[Install Dialect via Flathub][43]
|
||||
|
||||
More information about Dialect –
|
||||
|
||||
* [Home page][44]
|
||||
* [Source code][45]
|
||||
|
||||
|
||||
|
||||
#### Video Trimmer – Cut your Videos Faster
|
||||
|
||||
The Video Trimmer is a perfect little utility to cut your videos superfast. It only takes start and end timestamp of your video and give you the final file. It saves the file to your target directory, and you can also open the file location directly from the app itself. This app perfectly integrates with GNOME UI and gives you nice preview of the trim timeline and video preview.
|
||||
|
||||
![Video Trimmer][46]
|
||||
|
||||
Here’s how you can install this app.
|
||||
|
||||
[Setup Flatpak][15] for your Linux distribution. And then click on the below button to launch the native software manager to install (such as Software or Discover).
|
||||
|
||||
[Install Video Trimmer via Flathub][47]
|
||||
|
||||
Additional information about this app-
|
||||
|
||||
* [Source code][48]
|
||||
|
||||
|
||||
|
||||
#### Console – A New Minimal GNOME Terminal for beginners
|
||||
|
||||
This is a fairly new application which is currently in development. This is a simple terminal program intended for users those are not technically sound. For advanced users, GNOME already has a terminal emulator called [GNOME Terminal][49].
|
||||
|
||||
You might ask why GNOME need another terminal, right? Well, Console is designed for novice terminal users with the following use cases in mind.
|
||||
|
||||
* A nice notification when a command is completed
|
||||
* If user tries root mode (using sudo, su etc), the terminal turns RED
|
||||
* While using ssh, the terminal turns purple.
|
||||
|
||||
|
||||
|
||||
This app is still in development in GitLab. Unfortunately, no installer is available at the moment. However, you can go ahead and compile. I tried to get it compiled using meson, but it failed for dependencies.
|
||||
|
||||
Once I am able to compile it, I will put up a screenshot here.
|
||||
|
||||
In the meantime, you can follow this project in [GitLab][50].
|
||||
|
||||
#### Crosswords for GNOME
|
||||
|
||||
I am sure you love solving Crosswords. Then this final app for GNOME is perfect for you. GNOME Crosswords is Crossword player and editor. This game comes with Crossword puzzle sets which you can start solving. If you are stuck, the app will help you to reveal mistakes in your word choosing. The basic squared black and white crosswords are available, however with its styling support, you can enjoy various shapes and colors as crossword boards.
|
||||
|
||||
![GNOME Crosswords – Image 1][51]
|
||||
|
||||
![GNOME Crosswords – Image 2][52]
|
||||
|
||||
This app is under development at the moment on the editing part. But you can still play by installing a demo flatpak, all available in the below link.
|
||||
|
||||
Open the below link via your system’s software installer (Such as GNOME Software or Discover). Make sure to [set up Flatpak][15] before installing.
|
||||
|
||||
[Install Demo Crossword via private repo][53]
|
||||
|
||||
Follow the development of this app [here][54].
|
||||
|
||||
* * *
|
||||
|
||||
### Closing Notes
|
||||
|
||||
So, that’s about it with this edition of the perfect and best of GNOME Apps series. I hope you get to discover some cool GTK apps for your GNOME desktop. Make sure to start using them for your job/purpose. What is your opinion about perfect GNOME Apps in this article? Let me know in the comment box below.
|
||||
|
||||
* [Part 1][1]
|
||||
* [Part 3][2]
|
||||
* [Part 4][3]
|
||||
|
||||
|
||||
|
||||
_Some Image Credits: respective app owners_
|
||||
|
||||
* * *
|
||||
|
||||
We bring the latest tech, software news and stuff that matters. Stay in touch via [Telegram][55], [Twitter][56], [YouTube][57], and [Facebook][58] and never miss an update!
|
||||
|
||||
##### Also Read
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.debugpoint.com/2021/12/best-gnome-apps-part-2/
|
||||
|
||||
作者:[Arindam][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.debugpoint.com/author/admin1/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.debugpoint.com/2021/12/best-gnome-apps-part-1/
|
||||
[2]: https://www.debugpoint.com/2022/01/best-gnome-apps-part-3/
|
||||
[3]: https://www.debugpoint.com/2022/02/best-gnome-apps-part-4/
|
||||
[4]: tmp.gkcrhOlzXU#flatseal
|
||||
[5]: tmp.gkcrhOlzXU#junction
|
||||
[6]: tmp.gkcrhOlzXU#blanket
|
||||
[7]: tmp.gkcrhOlzXU#mousai
|
||||
[8]: tmp.gkcrhOlzXU#shortwave
|
||||
[9]: tmp.gkcrhOlzXU#health
|
||||
[10]: tmp.gkcrhOlzXU#dialect
|
||||
[11]: tmp.gkcrhOlzXU#video-trimmer
|
||||
[12]: tmp.gkcrhOlzXU#console
|
||||
[13]: tmp.gkcrhOlzXU#crossword
|
||||
[14]: https://www.debugpoint.com/wp-content/uploads/2021/12/Flatseal-Showing-list-of-apps-and-their-permissions.jpg
|
||||
[15]: https://flatpak.org/setup/
|
||||
[16]: https://dl.flathub.org/repo/appstream/com.github.tchx84.Flatseal.flatpakref
|
||||
[17]: https://github.com/tchx84/Flatseal
|
||||
[18]: https://github.com/tchx84/Flatseal/blob/master/DOCUMENTATION.md
|
||||
[19]: https://www.debugpoint.com/wp-content/uploads/2021/12/Junction-GNOME-App-showing-options-as-app-to-open-an-image.jpg
|
||||
[20]: https://dl.flathub.org/repo/appstream/re.sonny.Junction.flatpakref
|
||||
[21]: https://apps.gnome.org/app/re.sonny.Junction/
|
||||
[22]: https://github.com/sonnyp/Junction
|
||||
[23]: https://www.debugpoint.com/wp-content/uploads/2021/12/Calm-your-mind-using-Blanket.jpg
|
||||
[24]: https://dl.flathub.org/repo/appstream/com.rafaelmardojai.Blanket.flatpakref
|
||||
[25]: https://github.com/rafaelmardojai/blanket
|
||||
[26]: https://apps.gnome.org/app/com.rafaelmardojai.Blanket/
|
||||
[27]: https://www.shazam.com/home
|
||||
[28]: https://www.debugpoint.com/wp-content/uploads/2021/12/Mousai.jpg
|
||||
[29]: http://audd.io
|
||||
[30]: https://dl.flathub.org/repo/appstream/io.github.seadve.Mousai.flatpakref
|
||||
[31]: https://apps.gnome.org/app/io.github.seadve.Mousai/
|
||||
[32]: https://github.com/SeaDve/Mousai
|
||||
[33]: https://www.debugpoint.com/wp-content/uploads/2021/12/Shortwave-App.jpg
|
||||
[34]: https://www.debugpoint.com/2020/10/10-things-to-do-fedora-33-after-install/
|
||||
[35]: https://dl.flathub.org/repo/appstream/de.haeckerfelix.Shortwave.flatpakref
|
||||
[36]: https://apps.gnome.org/app/de.haeckerfelix.Shortwave/
|
||||
[37]: https://gitlab.gnome.org/World/Shortwave
|
||||
[38]: https://www.debugpoint.com/wp-content/uploads/2021/12/Health-App.jpg
|
||||
[39]: https://dl.flathub.org/repo/appstream/dev.Cogitri.Health.flatpakref
|
||||
[40]: https://apps.gnome.org/app/dev.Cogitri.Health/
|
||||
[41]: https://gitlab.gnome.org/World/Health
|
||||
[42]: https://www.debugpoint.com/wp-content/uploads/2021/12/Dialect.jpg
|
||||
[43]: https://dl.flathub.org/repo/appstream/com.github.gi_lom.dialect.flatpakref
|
||||
[44]: https://apps.gnome.org/app/com.github.gi_lom.dialect/
|
||||
[45]: https://github.com/dialect-app/dialect/
|
||||
[46]: https://www.debugpoint.com/wp-content/uploads/2021/12/Video-Trimmer.jpg
|
||||
[47]: https://dl.flathub.org/repo/appstream/org.gnome.gitlab.YaLTeR.VideoTrimmer.flatpakref
|
||||
[48]: https://gitlab.gnome.org/YaLTeR/video-trimmer
|
||||
[49]: https://help.gnome.org/users/gnome-terminal/stable/
|
||||
[50]: https://gitlab.gnome.org/GNOME/console
|
||||
[51]: https://www.debugpoint.com/wp-content/uploads/2021/12/GNOME-Crosswords-Image-1-1024x569.jpg
|
||||
[52]: https://www.debugpoint.com/wp-content/uploads/2021/12/GNOME-Crosswords-Image-2-1024x629.jpg
|
||||
[53]: https://people.gnome.org/~jrb/org.gnome.Crosswords/crosswords.flatpak
|
||||
[54]: https://gitlab.gnome.org/jrb/crosswords
|
||||
[55]: https://t.me/debugpoint
|
||||
[56]: https://twitter.com/DebugPoint
|
||||
[57]: https://www.youtube.com/c/debugpoint?sub_confirmation=1
|
||||
[58]: https://facebook.com/DebugPoint
|
@ -1,133 +0,0 @@
|
||||
[#]: subject: "3 ways I configure SSH for privacy"
|
||||
[#]: via: "https://opensource.com/article/22/2/configure-ssh-privacy"
|
||||
[#]: author: "Jonathan Garrido https://opensource.com/users/jgarrido"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
3 ways I configure SSH for privacy
|
||||
======
|
||||
Here's how I optimize my SSH experience and protect my servers from
|
||||
unauthorized access.
|
||||
![A keyboard with privacy written on it.][1]
|
||||
|
||||
SSH (Secure Shell) is a protocol that enables you to create a verified and private connection, securing the channel using cryptographic keys, to launch a remote shell on another machine. Using this connection, you can execute remote commands, initiate secure file transfers, forward sockets and displays and services, and much more.
|
||||
|
||||
Before the appearance of SSH, most remote administration was done over telnet, and to be fair, once you could establish a remote session, you could do practically whatever you need. The problem with this protocol was that traffic traveled unencrypted as pure plaintext. It didn't take much effort to use a [traffic sniffer][2] to see all the packets within a session, including those containing a username and password.
|
||||
|
||||
With SSH, thanks to the use of asymmetric keys, the sessions between the apparatus involved in the communication are encrypted. And nowadays this is more relevant than ever, with all the cloud servers getting administered from all over the world.
|
||||
|
||||
### 3 tips for SSH configuration
|
||||
|
||||
The most common implementation of the SSH protocol is OpenSSH, developed by the OpenBSD project and available to most Linux and Unix-like operating systems. Once you install this package, you have a file named `sshd_config` that controls most of the behavior of the service. The default settings are generally very conservative, but I tend to make some adjustments to optimize my SSH experience and protect my servers from unauthorized access.
|
||||
|
||||
### 1\. Change the default port
|
||||
|
||||
This is the one that not all administrators remember. Anyone with a port scanner can discover an SSH port even after you moved it, so you're hardly removing yourself from harm's way, but you do conveniently avoid hundreds of unsophisticated scripts launched against your server. It's a favor you can do yourself to cut out a good amount of noise from your logs.
|
||||
|
||||
For this article, I had an SSH server default port TCP 22 over one cloud provider, and the average attacks per minute were 24. After changing the port to a much higher number, TCP 45678, the average of people connecting and guessing any username or password was two per day.
|
||||
|
||||
To change the default port for SSH, open `/etc/ssh/sshd_config` in your favorite text editor and change the value of the `Port`** **from 22 to some number greater than 1024. The line may be commented because 22 is the default (so it doesn't need to be explicitly declared in the config), so uncomment the line before saving.
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
#Port 22122
|
||||
#AddressFamily any
|
||||
#ListenAddress 0.0.0.0
|
||||
#ListenAddress ::
|
||||
|
||||
```
|
||||
|
||||
Once you've changed the port and saved the file, restart the SSH server:
|
||||
|
||||
|
||||
```
|
||||
`$ sudo systemctl restart sshd`
|
||||
```
|
||||
|
||||
### 2\. No more passwords
|
||||
|
||||
There's a general movement to stop using passwords as a means of authentication, with methods such as two-factor authentication gaining popularity. OpenSSH can authenticate using asymmetric keys, so there's no need to remember complex passwords, much less to rotate them every few months, or fear that someone was "shoulder surfing" while you were establishing your remote session. The use of SSH keys allows you to log in to your remote equipment quickly and securely. This often means less time processing incorrect usernames and passwords for the server itself. Login is pleasantly simple. When there's no key, there's no entry—not even a prompt.
|
||||
|
||||
To use this feature, you must configure both the client (the computer physically in front of you) and the server (the remote machine).
|
||||
|
||||
On the client machine, you must generate an SSH key pair. This consists of a public and a private key. As their names imply, one key is for you to distribute to servers you want to login to, and the other is private and must get shared with no one. Create a new key with the `ssh-keygen` command, and use the `-t` option to specify a good, recent cryptography library like `ed25519`:
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
$ ssh-keygen -t ed25519
|
||||
Generating public/private ed25519 key pair.
|
||||
Enter file in which to save the key (~/.ssh/id_ed25519):
|
||||
|
||||
```
|
||||
|
||||
During key creation, you get prompted to name the file. You can press **Return** to accept the default. Should you create more keys in the future, you can give each one a custom name, but having multiple keys means specifying which key you want to use for each interaction, so for now, just accept the default.
|
||||
|
||||
You can also give your key a passphrase. This ensures that even if someone else manages to obtain your private key (which itself should never happen), they're unable to put it to use without your passphrase. It's a useful safeguard for some keys, while it's not appropriate for others (especially those used in scripts). Press **Return** to leave your key with no passphrase or create a passphrase if you choose.
|
||||
|
||||
To copy your key onto a server, use the `ssh-copy-id` command. For example, if I own a server named `example.com`, then I can copy my public key to it with this command:
|
||||
|
||||
|
||||
```
|
||||
`$ ssh-copy-id jgarrido@example.com`
|
||||
```
|
||||
|
||||
This creates or amends the file `authorized_keys` in the server's `.ssh` directory with your public key.
|
||||
|
||||
Once the `ssh-copy-id` command has confirmed what it's done, try to log in from your computer to verify you can log in without a password (or with your key's passphrase if you choose to use one).
|
||||
|
||||
Once you're on your server without using your server account's password, edit the server's `sshd_config` and set `PasswordAuthentication` to `no`.
|
||||
|
||||
|
||||
```
|
||||
`PasswordAuthentication no`
|
||||
```
|
||||
|
||||
Restart the `ssh` service to load the new config:
|
||||
|
||||
|
||||
```
|
||||
`$ sudo systemctl restart sshd`
|
||||
```
|
||||
|
||||
### 3\. Decide who can log in
|
||||
|
||||
Most distributions don't allow the root user to log in over SSH, which ensures that only non-privileged accounts are active, using the `sudo` command to escalate privileges as required. This prevents one notable and painfully obvious target (root) from simple but all too common scripted attacks.
|
||||
|
||||
Similarly, a simple and powerful feature of OpenSSH is the ability to decide which users can log into a machine. To set which users get granted SSH access, open the `sshd_config` file in your favorite text editor, and add a line like this:
|
||||
|
||||
|
||||
```
|
||||
`AllowUsers jgarrido jane tux`
|
||||
```
|
||||
|
||||
Restart the SSH service to load the new config options.
|
||||
|
||||
This allows only the three users (jgarrido, jane, and tux) to log in or execute any operation on the remote machine.
|
||||
|
||||
### Final thoughts
|
||||
|
||||
You can use OpenSSH to implement a strong and robust SSH server. These were only three useful options to harden your installation. Still, there are tons of features and options that you can turn on or off within the `sshd_config` file, and there are many great applications like [Fail2ban][3] that you can use to safeguard your SSH service further.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/2/configure-ssh-privacy
|
||||
|
||||
作者:[Jonathan Garrido][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/jgarrido
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/privacy_keyboard_security.jpg?itok=vZ9jFdK_ (A keyboard with privacy written on it.)
|
||||
[2]: https://www.redhat.com/sysadmin/troubleshoot-network-dhcp-configuration
|
||||
[3]: https://opensource.com/life/15/7/pipe-dreams
|
@ -1,240 +0,0 @@
|
||||
[#]: subject: "Learn Perl in 2022"
|
||||
[#]: via: "https://opensource.com/article/22/2/perl-cheat-sheet"
|
||||
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Learn Perl in 2022
|
||||
======
|
||||
Download the programming cheat sheet and start learning the powers of
|
||||
Perl.
|
||||
![Woman sitting in front of her computer][1]
|
||||
|
||||
Released in early 1988, Perl is a postmodern programming language often considered a scripting language, but it is also capable of object-oriented programming. It is a mature language with [tens of thousands of libraries][2], GUI frameworks, a spin-off language called Raku, and an active and passionate community. Its developers pride themselves on its flexibility: According to its creator Larry Wall, Perl doesn't enforce any particular programming style on its users, and there's more than one way to accomplish most things.
|
||||
|
||||
Perl is every bit as robust as it was when it was in widespread use, making it a great language for newer programmers to try.
|
||||
|
||||
**[ Download the [Perl cheat sheet][3] ]**
|
||||
|
||||
### Perl basics
|
||||
|
||||
On Linux and macOS, you already have Perl installed. On Windows, download and install it from the [Perl website][4].
|
||||
|
||||
#### Perl expressions
|
||||
|
||||
The basic unit of Perl source code is an _expression_, which is anything that returns a _value_.
|
||||
|
||||
For instance, `1` is an expression. It returns the value of `1`. The expression `2` returns the value of `2`, and `a` returns the letter `a`.
|
||||
|
||||
Expressions can be more complex. The expression `$a + $b` contains variables (placeholders for data) and the plus symbol (`+`), which is a math operator.
|
||||
|
||||
#### Perl statements
|
||||
|
||||
A Perl statement is made up of expressions. Each statement ends in a semi-colon (`;`).
|
||||
|
||||
For example:
|
||||
|
||||
|
||||
```
|
||||
`$c = $a + $b;`
|
||||
```
|
||||
|
||||
To try running your own Perl statement, open a terminal and type:
|
||||
|
||||
|
||||
```
|
||||
`$ perl -e 'print ("Hello Perl\n");'`
|
||||
```
|
||||
|
||||
#### Perl blocks
|
||||
|
||||
A block of Perl statements can be grouped together with braces (`{ }`). Blocks are a useful organizational tool, but they also provide _scope_ for data that you may only need to use for a small section of your program. Python defines scope with whitespace, LISP uses parentheses, while C and Java use braces.
|
||||
|
||||
#### Variables
|
||||
|
||||
Variables are placeholders for data. Humans use variables every day without thinking about it. For instance, the word "it" can refer to any noun, so we use it as a convenient placeholder. "Find my phone and bring it to me" really means "Find my phone and bring my phone to me."
|
||||
|
||||
For computers, variables aren't a convenience but a necessity. Variables are how computers identify and track data.
|
||||
|
||||
In Perl, you create variables by declaring a variable name and then its contents.
|
||||
|
||||
Variable names in Perl are always preceded by a dollar sign (`$`).
|
||||
|
||||
These simple statements create a variable `$var` containing the strings "Hello" and "Perl" and then prints the contents of the variable to your terminal:
|
||||
|
||||
|
||||
```
|
||||
`$ perl -e '$var = "hello perl"; print ("$var\n");'`
|
||||
```
|
||||
|
||||
#### Flow control
|
||||
|
||||
Most programs require a decision to be made, and those choices are defined and controlled by conditional statements and loops. The _if_ statement is one of the most intuitive: Perl can test for a specific condition, and Perl decides how the program proceeds based on that condition. The syntax is similar to C or Java:
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
my $var = 1;
|
||||
|
||||
if($var == 1){
|
||||
[print][5]("Hello Perl\n");
|
||||
}
|
||||
elsif($var == 0){
|
||||
[print][5]("1 not found");
|
||||
}
|
||||
else{
|
||||
[print][5]("Good-bye");
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
Perl also features a short form of the `if` statement:
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
$var = 1;
|
||||
|
||||
[print][5]("Hello Perl\n") if($var == 1);
|
||||
|
||||
```
|
||||
|
||||
#### Functions and subroutines
|
||||
|
||||
Reusing code as often as possible is a helpful programming habit. This practice reduces errors (or consolidates errors into one code block, so you only have to fix it once), makes your program easier to maintain, simplifies your program's logic, and makes it easier for other developers to understand.
|
||||
|
||||
In Perl, you can create a _subroutine_ that takes inputs (stored in a special array variable called `@_`) and may return an output. You create a subroutine using the keyword `sub`, followed by a subroutine name of your choosing, and then the code block:
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
#!/usr/bin/env perl
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
sub sum {
|
||||
my $total = 0;
|
||||
|
||||
for my $i(@_){
|
||||
$total += $i;
|
||||
}
|
||||
|
||||
[return][6]($total);
|
||||
}
|
||||
|
||||
[print][5] &sum(1,2), "\n";
|
||||
|
||||
```
|
||||
|
||||
Of course, Perl has many subroutines you never have to create yourself. Some are built into Perl, and community libraries provide others.
|
||||
|
||||
### Scripting with Perl
|
||||
|
||||
Perl can be compiled, or it can be used as an interpreted scripting language. The latter is the easiest option when just starting, especially if you're already familiar with Python or [shell scripting][7].
|
||||
|
||||
Here's a simple dice-roller script written in Perl. Read it through and see if you can follow it.
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
#!/usr/bin/env perl
|
||||
|
||||
use warnings;
|
||||
use strict;
|
||||
use utf8;
|
||||
[binmode][8] STDOUT, ":encoding(UTF-8)";
|
||||
[binmode][8] STDERR, ":encoding(UTF-8)";
|
||||
|
||||
my $sides = [shift][9] or
|
||||
[die][10] "\nYou must provide a number of sides for the dice.\n";
|
||||
|
||||
sub roller {
|
||||
my ($s) = @_;
|
||||
|
||||
my $roll = [int][11]([rand][12]($s));
|
||||
[print][5] $roll+1, "\n";
|
||||
}
|
||||
|
||||
roller($sides);
|
||||
|
||||
```
|
||||
|
||||
The first line tells your [POSIX][13] terminal what executable to use to run the script.
|
||||
|
||||
The next five lines are boilerplate includes and settings. The `use warnings` setting tells Perl to check for errors and issue warnings in the terminal about problems it finds. The `use strict` setting tells Perl not to run the script when errors are found.
|
||||
|
||||
Both of these settings help you find errors in your code before they cause problems, so it's usually best to have them active in your scripts.
|
||||
|
||||
The main part of the script begins by parsing the [argument][14] provided to the script when it is launched from a terminal. In this case, the expected argument is the desired side of a virtual die. Perl treats this as a stack and uses the `shift` function to assign it to the variable `$sides`. The `die` function gets triggered when no arguments are provided.
|
||||
|
||||
The `roller` subroutine or function, created with the `sub` keyword, uses the `rand` function of Perl to generate a pseudo-random number up to, and not including, the number provided as an argument. That means that a 6-sided die in this program can never roll a 6, but it can roll a 0. That's fine for computers and programmers, but to most users, that's confusing, so it can be considered a bug. To fix that bug before it becomes a problem, the next line adds 1 to the random number and prints the total as the die-roll result.
|
||||
|
||||
When referencing an argument passed to a subroutine, you reference the special variable `@_`, which is an array containing everything included in parentheses as part of the function call. However, when extracting a value from an array, the data is cast as a scalar (the `$s` variable in the example).
|
||||
|
||||
A subroutine doesn't run until it's called, so the final line of the script invokes the custom `roller` function, providing the command's argument as the function's argument.
|
||||
|
||||
Save the file as `dice.pl` and mark it executable:
|
||||
|
||||
|
||||
```
|
||||
`$ chmod +x dice.pl`
|
||||
```
|
||||
|
||||
Finally, try running it, providing it with a maximum number from which to choose its random number:
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
$ ./dice.pl 20
|
||||
1
|
||||
$ ./dice.lisp 20
|
||||
7
|
||||
$ ./dice.lisp 20
|
||||
20
|
||||
|
||||
```
|
||||
|
||||
Not bad!
|
||||
|
||||
### Perl cheat sheet
|
||||
|
||||
Perl is a fun and powerful language. Although up-and-coming languages like Python, Ruby, and Go have caught many people's attention since Perl was the default scripting language, Perl is no less robust. In fact, it's better than ever, with a bright future ahead.
|
||||
|
||||
Next time you're looking for a more flexible language with easy delivery options, try Perl and [download the cheat sheet][3]!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/2/perl-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/OSDC_women_computing_2.png?itok=JPlR5aCA (Woman sitting in front of her computer)
|
||||
[2]: http://cpan.org/
|
||||
[3]: https://opensource.com/downloads/perl-cheat-sheet
|
||||
[4]: https://www.perl.org/get.html
|
||||
[5]: http://perldoc.perl.org/functions/print.html
|
||||
[6]: http://perldoc.perl.org/functions/return.html
|
||||
[7]: https://opensource.com/article/20/4/bash-programming-guide
|
||||
[8]: http://perldoc.perl.org/functions/binmode.html
|
||||
[9]: http://perldoc.perl.org/functions/shift.html
|
||||
[10]: http://perldoc.perl.org/functions/die.html
|
||||
[11]: http://perldoc.perl.org/functions/int.html
|
||||
[12]: http://perldoc.perl.org/functions/rand.html
|
||||
[13]: https://opensource.com/article/19/7/what-posix-richard-stallman-explains
|
||||
[14]: https://opensource.com/article/21/8/linux-terminal
|
@ -1,218 +0,0 @@
|
||||
[#]: subject: "10 Open Source Lightweight Web Browsers for Linux"
|
||||
[#]: via: "https://itsfoss.com/lightweight-web-browsers-linux/"
|
||||
[#]: author: "Marco Carmona https://itsfoss.com/author/marco/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
10 Open Source Lightweight Web Browsers for Linux
|
||||
======
|
||||
|
||||
There are [plenty of web browsers available for Linux][1]. A lot of them are based on [Chromium][2] but we also have a list of [browsers that are not based on Chromium][3].
|
||||
|
||||
Recently, a reader asked for a lightweight web browsers recommendation and hence I took the responsibility of doing some quick experimentation. Here’s what I found.
|
||||
|
||||
### Lightweight web browsers for Linux
|
||||
|
||||
I did not run any benchmark test because what may work on one system may not work on others. This article is based on my experience and opinion.
|
||||
|
||||
Another thing to keep in mind is that some lightweight web browsers may have limited extensions. If you rely on features like account synchronization and uses tons of browser extensions, these browsers may not suffice your need. However, you could still try some of them to have as your secondary browser.
|
||||
|
||||
_**One more thing! This is not a ranking list. The browser at number 2 should not be considered better than the one at number 5.**_
|
||||
|
||||
Note
|
||||
|
||||
Browsers are gateways to a lot of things. You should not use an obscure web browser that is not actively developed or maintained only by a single developer. This especially goes for banking and shopping. Sticking with a mainstream browser like Firefox, Brave, Vivaldi, Chrome/Chromium is better in such cases.
|
||||
|
||||
#### 1\. Viper
|
||||
|
||||
![Viper][4]
|
||||
|
||||
Focusing on privacy, minimalism, and customization, this browser has become a powerful lightweight place where you can do every search you want. It is, in my opinion, an essential navigator with basic features like tab hibernation support, secure AutoFill management, full-screen support, among others.
|
||||
|
||||
This is not a regular browser, but if you’re a fan of minimalism, perhaps this one is for you.
|
||||
|
||||
[Viper][5]
|
||||
|
||||
[][6]
|
||||
|
||||
![][7]
|
||||
|
||||
#### [Min: An Open Source Web Browser for Minimalists][6]
|
||||
|
||||
#### 2\. Nyxt
|
||||
|
||||
![Nyxt][8]
|
||||
|
||||
“The hacker’s power-browser” is how the official page of [Nyxt][9] describes it; and being honest, it is wonderful.
|
||||
|
||||
Even though it is not the only keyboard-oriented web browser around; its unique feature is that you can overwrite and reconfigure every single class, method, and function inside this one. It also has a built-in command line tool. No wonder why it is called “The hacker’s power-browser”.
|
||||
|
||||
Nyxt uses a simple computer programming environment that takes single user inputs, executes them, and returns the result to the user; most famous as [RELP (read-eval-print loop)][10].
|
||||
|
||||
[Nyxt][9]
|
||||
|
||||
#### 3\. Lynx
|
||||
|
||||
![Lynx][11]
|
||||
|
||||
I definitely would say this one is for the [CLI][12] fans because this amazing browser lets you [surf the internet from your Linux terminal][13]. That’s right! You can easily access the internet by starting it in your terminal.
|
||||
|
||||
Of course, it consumes less resources but you should not expect same kind of browsing experience you get from regular browsers like Firefox or Brave.
|
||||
|
||||
_**Did you know this is the oldest web browser still being maintained, having started in 1992?**_
|
||||
|
||||
[Lynx][14]
|
||||
|
||||
#### 4\. SeaMonkey
|
||||
|
||||
![SeaMonkey][15]
|
||||
|
||||
This one is another all-in-one navigator, but what does SeaMonkey include? SeaMonkey adds characteristics like an email client, web feed reader, HTML editor, IRC chat, and web development tools; among other features.
|
||||
|
||||
I would say [SeaMonkey][16] is an incredible fork of Firefox like [Librewolf][17]. It uses much of the same Mozilla Firefox source code, as its web page said.
|
||||
|
||||
[SeaMonkey][18]
|
||||
|
||||
#### 5\. Waterfox
|
||||
|
||||
![Waterfox][19]
|
||||
|
||||
To be honest, when I tried this browser on my personal computer, I was shocked about how good and fast it was. I am a fan of minimalism and I guess that is why I like it so much. One awesome characteristic of this browser is that it supports Chrome, Firefox, and Opera extensions.
|
||||
|
||||
So if you are thinking about trying a new fast, and secure browser without leaving your favorite extensions, [Waterfox][20] would be a perfect choice.
|
||||
|
||||
[Waterfox][21]
|
||||
|
||||
#### 6\. Pale Moon
|
||||
|
||||
![Pale Moon][22]
|
||||
|
||||
This one is another web browser based on Firefox code with characteristics like privacy, security, fully customizable, and optimized for modern processors. The one feature that looks interesting for me is that it continues supporting NPAPI plugins like Silverlight, Flash, and Java. Plugins that have been unmaintained in other browsers like Chrome and Microsoft Edge.
|
||||
|
||||
In this case, if some of your favorite web pages were affected by the stopped maintenance of plugins like flash, perhaps [Pale Moon][23] could revive them.
|
||||
|
||||
[Pale Moon][24]
|
||||
|
||||
#### 7\. Falkon
|
||||
|
||||
![Falkon][25]
|
||||
|
||||
[Falkon][26] is a KDE navigator which works with a technology called [QtWebEngine][27] which provides a rendering engine. It includes features like bookmarks and history in the sidebar and by default brings an ads blocker; which can help you to prevent tracking from websites.
|
||||
|
||||
One random fact about this browser is that it originally started only for educational purposes; but these days, you can use it for your daily routine. I invite you to try it and share with us your experience.
|
||||
|
||||
[Falkon][28]
|
||||
|
||||
#### 8\. Epiphany
|
||||
|
||||
![GNOME Web][29]
|
||||
|
||||
This navigator is most commonly known as GNOME Web, and it is a native web browser focused on Linux experience, which has a simple user interface for browsing. Of course, simple doesn’t mean less powerful.
|
||||
|
||||
Its technology to display web pages is similar to the layout engine used in the Mozilla project, and some of its most important features are:
|
||||
|
||||
* Customizable user interface
|
||||
* Availability in more than 60 languages
|
||||
* Cookie management
|
||||
* Extensions to execute commands, python scripts, group tabs, select your stylesheet, etc.
|
||||
|
||||
|
||||
|
||||
If you’re looking for a simple and minimalist browser with is focused specifically on Linux, this is the one.
|
||||
|
||||
[GNOME Web][30]
|
||||
|
||||
#### 9\. Otter
|
||||
|
||||
![Otter][31]
|
||||
|
||||
If you remember how [Opera][32] 12 used to look like some years ago, this navigator will remind you of this user interface. The principal purpose of this browser is to provide powerful tools for experiment users while they keep browsing.
|
||||
|
||||
Something interesting and important that I noticed was the continued commitment to the source code from the community to improve this browser.
|
||||
|
||||
This one is a good option if you are looking for a fast, secure, and robust one at the time of browsing in Linux.
|
||||
|
||||
[Otter][33]
|
||||
|
||||
#### 10\. Midori Web Browser
|
||||
|
||||
![Midori][34]
|
||||
|
||||
There used to be a popular browser called Midori but its development has changed course after its merger with [Astian project][35]. However, you can still install it on your Linux distro thanks to the snap store.
|
||||
|
||||
Its three most powerful features are:
|
||||
|
||||
* Adblock filter list support.
|
||||
* Private browsing.
|
||||
* Manage cookies and scripts.
|
||||
|
||||
|
||||
|
||||
But something that really got me shocked was that it lets you open 1000 tabs instantly and create easy web apps; these last two facts are according to [its page in Snapcraft][36].
|
||||
|
||||
Midori
|
||||
|
||||
### Conclusion
|
||||
|
||||
Remember, finding the perfect browser will depend on your necessities and resources. Overall, it all comes down to what suits you.
|
||||
|
||||
Using [lightweight applications][37] is one way to have a better computing experience when your systems is low on the hardware side.
|
||||
|
||||
I have avoided some other browsers like [Brave or Vivaldi][38] because my focus was on less popular, lightweight web browsers on Linux. If you know a few more which you use regularly, please mention them in the comment section.
|
||||
|
||||
If this article was interesting and helpful for you, please take a minute to share it on social media; you can make a difference!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/lightweight-web-browsers-linux/
|
||||
|
||||
作者:[Marco Carmona][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/marco/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://itsfoss.com/best-browsers-ubuntu-linux/
|
||||
[2]: https://itsfoss.com/install-chromium-ubuntu/
|
||||
[3]: https://itsfoss.com/open-source-browsers-linux/
|
||||
[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/Viper.png?resize=800%2C459&ssl=1
|
||||
[5]: https://github.com/LeFroid/Viper-Browser
|
||||
[6]: https://itsfoss.com/min-an-open-source-web-browser-for-minimalists/
|
||||
[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2018/02/min-web-browser-featured.jpeg?fit=800%2C450&ssl=1
|
||||
[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/Nyxt.png?resize=800%2C459&ssl=1
|
||||
[9]: https://itsfoss.com/nyxt-browser/
|
||||
[10]: https://en.wikipedia.org/wiki/Reliable_Event_Logging_Protocol
|
||||
[11]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/Lynx-2.png?resize=800%2C458&ssl=1
|
||||
[12]: https://itsfoss.com/gui-cli-tui/
|
||||
[13]: https://itsfoss.com/terminal-web-browsers/
|
||||
[14]: https://lynx.invisible-island.net/current/index.html
|
||||
[15]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/SeaMonkey-1.png?resize=800%2C459&ssl=1
|
||||
[16]: https://www.seamonkey-project.org/
|
||||
[17]: https://librewolf-community.gitlab.io/
|
||||
[18]: https://www.seamonkey-project.org/releases/
|
||||
[19]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/waterfox-1.png?resize=800%2C459&ssl=1
|
||||
[20]: https://itsfoss.com/waterfox-browser/
|
||||
[21]: tmp.hhjyWXXJ8J
|
||||
[22]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/palemoon.png?resize=800%2C459&ssl=1
|
||||
[23]: https://www.palemoon.org/
|
||||
[24]: https://linux.palemoon.org/
|
||||
[25]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/falkon-1.png?resize=800%2C459&ssl=1
|
||||
[26]: https://itsfoss.com/falkon-browser/
|
||||
[27]: https://wiki.qt.io/QtWebEngine
|
||||
[28]: https://www.falkon.org/download/
|
||||
[29]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/GNOME-Web.png?resize=800%2C458&ssl=1
|
||||
[30]: https://wiki.gnome.org/Apps/Web
|
||||
[31]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/Otter.png?resize=800%2C459&ssl=1
|
||||
[32]: https://itsfoss.com/install-opera-ubuntu/
|
||||
[33]: https://github.com/OtterBrowser/otter-browser/blob/master/INSTALL.md
|
||||
[34]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/Midori.png?resize=800%2C458&ssl=1
|
||||
[35]: https://astian.org/en/midori-browser/
|
||||
[36]: https://snapcraft.io/midori
|
||||
[37]: https://itsfoss.com/lightweight-alternative-applications-ubuntu/
|
||||
[38]: https://itsfoss.com/brave-vs-vivaldi/
|
@ -1,112 +0,0 @@
|
||||
[#]: subject: "5 ways LibreOffice supports accessibility"
|
||||
[#]: via: "https://opensource.com/article/22/2/libreoffice-accessibility"
|
||||
[#]: author: "Don Watkins https://opensource.com/users/don-watkins"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
5 ways LibreOffice supports accessibility
|
||||
======
|
||||
Try one of these accessibility features in LibreOffice. You might find
|
||||
better or alternative ways of doing everyday tasks.
|
||||
![Coding on a computer][1]
|
||||
|
||||
LibreOffice.org is my preferred productivity suite, and I've covered how I use it both as a [graphical office suite][2] as well as a [terminal command][3] in the past.
|
||||
|
||||
In this article, I want to focus on how LibreOffice supports people using assistive technology.
|
||||
|
||||
### Mouse
|
||||
|
||||
The mouse was an important invention, but it doesn't work equally well for everyone. For instance, people who can't see the mouse pointer on the screen or can't physically operate the mouse on their desk don't benefit much from a mouse.
|
||||
|
||||
To account for the difference in how people interact with their computers, you can use LibreOffice without a mouse. As with most accessibility features in applications, this feature is helpful to anyone. Even if you are a mouse user yourself, sometimes you don't want to take your hand off the keyboard. Being able to trigger specific LibreOffice actions while still in "typing mode" is really convenient for the busy typist.
|
||||
|
||||
You can open every item in LibreOffice's main menu using the **Alt** key followed by a trigger letter in the menu's name. You don't see these trigger letters by default, but they appear when you press the **Alt** key.
|
||||
|
||||
![LibreOffice Writer menus with underlines][4]
|
||||
|
||||
(Don Watkins, [CC BY-SA 4.0][5])
|
||||
|
||||
To open the **File** menu, press and hold **ALT+F**. To open the **Format** menu, press and hold **ALT+O**. Once the menu is open, you may release the keys.
|
||||
|
||||
After you open a menu, each item in that menu has a trigger letter, or you can use the **Arrow** keys on your keyboard to navigate to the item and press **Enter**.
|
||||
|
||||
To close a menu without doing anything, press the **Esc** key.
|
||||
|
||||
### Change a font without the mouse
|
||||
|
||||
Everything in LibreOffice's interface is available from its menus, even if you think it is just an element in a toolbar. For instance, you may usually move your mouse to the formatting toolbar to change a font, but you can also change the font by selecting text and then opening the **Format** menu and selecting **Character** to open the **Character** dialog. You can navigate this dialog using the **Tab**, **Arrows**, and **Enter **keys.
|
||||
|
||||
The important thing to note here is that you can use many different paths in an application to reach the same goal. Each use case might have a different optimal path, so it's important not to think too linearly when approaching a task.
|
||||
|
||||
### Common shortcuts
|
||||
|
||||
Here are some LibreOffice Writer shortcut keys:
|
||||
|
||||
* **F2**: Formula bar
|
||||
* **Ctrl+F2**: Insert fields
|
||||
* **F3**: Auto text
|
||||
* **F5**: Navigator on/off
|
||||
* **Shift+F5**: Moves the cursor to its position when you last saved the document
|
||||
* **Ctrl+Shift+F5**: Navigator on, **Go to Page**
|
||||
* **F7**: **Spelling**
|
||||
* **F8**: **Thesaurus**
|
||||
|
||||
|
||||
|
||||
Here are shortcut keys for spreadsheets:
|
||||
|
||||
* **Ctrl+Home**: Returns you to cell A1
|
||||
* **Ctrl+End**: Moves you to the last cell that contains data
|
||||
* **Home**: Moves the cursor to the first cell in the current row
|
||||
* **End**: Moves the cursor to the last cell in the current row
|
||||
* **Shift+Home**: Selects cells from the current cell to the first cell of the current row
|
||||
|
||||
|
||||
|
||||
LibreOffice documentation is extensive and easily accessible by pressing **Alt+H** or **F1** from the keyboard.
|
||||
|
||||
### Accessibility settings
|
||||
|
||||
For more accessibility settings, go to the **Tools **menu and select** Options**. In the **Options** dialog, expand the **LibreOffice** category in the column on the left and then click **Accessibility**.
|
||||
|
||||
Options include:
|
||||
|
||||
* **Use text selection cursor in read-only text documents**: This allows you to move through a read-only document as if you could edit it, limiting what you can actually do to select and copy text.
|
||||
* **Allow animated images**: Not everyone wants moving images in their documents as they work. You can adjust that here.
|
||||
* **Allow animated text**: As with images, animated text styles can be fun for some and distracting or confusing to others.
|
||||
|
||||
|
||||
|
||||
There are also options for a high contrast theme. If you use a high contrast mode on your operating system, LibreOffice automatically detects it and changes its theme to match.
|
||||
|
||||
### Keyboard shortcuts
|
||||
|
||||
You can customize how you interact with LibreOffice by setting your own keyboard shortcuts. Go to the **Tools **menu and select **Customize **(or just press **Alt+T **followed by **C**.)
|
||||
|
||||
Select the **Keyboard **tab by pressing the **Arrow **key as necessary or click it with the mouse (if you're still using the mouse.)
|
||||
|
||||
### Open for all
|
||||
|
||||
Making open source applications accessible benefits all users. By trying accessibility features in LibreOffice, you might find better or alternative ways of doing everyday tasks. Whether you "need" the feature or not, accessibility provides options. Try some of them out because you might find something you love. And if you have a requirement that LibreOffice (or any of your favorite open source applications) doesn't seem to provide, let the project know by filing a feature request in its bug tracking system.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/2/libreoffice-accessibility
|
||||
|
||||
作者:[Don Watkins][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/don-watkins
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/code_computer_laptop_hack_work.png?itok=aSpcWkcl (Coding on a computer)
|
||||
[2]: https://opensource.com/article/21/9/libreoffice-tips
|
||||
[3]: https://opensource.com/article/21/3/libreoffice-command-line
|
||||
[4]: https://opensource.com/sites/default/files/uploads/libreoffice_menu_with_underlines.jpg (LibreOffice Writer menus with underlines)
|
||||
[5]: https://creativecommons.org/licenses/by-sa/4.0/
|
@ -1,82 +0,0 @@
|
||||
[#]: subject: "A guide to installing applications on Linux"
|
||||
[#]: via: "https://opensource.com/article/22/2/installing-applications-desktop-linux"
|
||||
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
A guide to installing applications on Linux
|
||||
======
|
||||
Get information on all of the different methods of installing
|
||||
applications on Linux from our new eBook.
|
||||
![Linux packages][1]
|
||||
|
||||
When you want to try a new app on your phone, you open your app store and install the app. It's simple, quick, and efficient. In this model of providing applications, phone vendors ensure that you know exactly where to go to get an app, and that developers with apps to distribute know where to put their apps so people can find them.
|
||||
|
||||
Before phones used this innovative model of software distribution, Linux was using it in the form of "software repositories." As the term implies, these were places on the Internet where applications were uploaded so Linux users could browse through them, and install them, from a central location. The term got shortened to just "repo" (for "repository," not "reposession"), but whether you call it a _repo_, _app store_, _software center_, _package manager_, or whatever else, it's a good system and has served Linux desktop users well for several decades.
|
||||
|
||||
The bottom line is that installing apps on Linux is a lot like installing apps on your phone. If you've done one, you can do the other.
|
||||
|
||||
**[ Download our eBook: [A guide to installing applications on Linux][2] ]**
|
||||
|
||||
### Software
|
||||
|
||||
On the GNOME desktop, your view into your desktop's software repository is an application called, simply, **Software**. You can think of this application as an extremely specific web browser. It's looking at software that's available to install from the Internet, gathering everything available into categories, and displaying it to you on your desktop.
|
||||
|
||||
![GNOME Software][3]
|
||||
|
||||
(Seth Kenlon, [CC BY-SA 4.0][4])
|
||||
|
||||
From the start screen, you have a few options.
|
||||
|
||||
* Search for an application you're already familiar with. To do this, click the magnifying glass icon in the top left corner of the window.
|
||||
* Browse by category. These are found at the bottom of the window.
|
||||
* Browse by recent and recommendations. These are listed in the animated banner and the icons below it.
|
||||
|
||||
|
||||
|
||||
When you click on an application that looks interesting to you, a feature page opens so you can see screenshots and read a short description of the software.
|
||||
|
||||
### Installing an app
|
||||
|
||||
Once you've found software you want to install, click the **Install** button at the top of the application feature page.
|
||||
|
||||
![An application page in GNOME Software][5]
|
||||
|
||||
(Seth Kenlon, [CC BY-SA 4.0][4])
|
||||
|
||||
Once it's installed, the **Install** button changes to a **Launch** button, so you can optionally launch the app you've just installed.
|
||||
|
||||
If you don't want to launch the app just now, you can always find it in your **Activities** menu along with all the other applications you already have on your computer.
|
||||
|
||||
### Getting more apps from more places
|
||||
|
||||
Your Linux desktop has applications packaged specifically for it, but in today's world there's a lot of open source happening all over the place. You can get more applications by adding "third party" repositories to your desktop's app store. Of course, all of these terms aren't exactly correct: what's a "third party" in a world where software is being created by everyone anyway, and what's an app store when nothing costs any money? Terminology aside, one popular third-party repo is [Flathub.org][6].
|
||||
|
||||
To add another source of apps to your Linux desktop, you essentially "install" a location into your app store. For Flathub, you download the **Flathub repository file** and install it with **GNOME Software**, just as if it were an app. It's not an app. It's a _source_ of apps, but the process is the same.
|
||||
|
||||
### Find out more
|
||||
|
||||
It wouldn't be Linux if there weren't a dozen other ways to perform any given task. Flexibility is built into the system with Linux, so while GNOME Software provides one easy way to get apps, there are lots of other ways, including install scripts, install wizards, AppImages, and of course compiling directly from source code. You can get information on all of these install methods from our new eBook, [**Installing Applications on Linux**][2]. It's free, so give it a read.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/2/installing-applications-desktop-linux
|
||||
|
||||
作者:[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/bitmap_1.png?itok=YkthYzSf (Linux packages)
|
||||
[2]: https://opensource.com/downloads/installing-linux-applications-ebook
|
||||
[3]: https://opensource.com/sites/default/files/gnome-software_1.png (GNOME Software)
|
||||
[4]: https://creativecommons.org/licenses/by-sa/4.0/
|
||||
[5]: https://opensource.com/sites/default/files/gnome-software-steam.png (An application page in GNOME Software)
|
||||
[6]: http://flathub.org/setup
|
@ -1,112 +0,0 @@
|
||||
[#]: subject: "Edit text on Linux with KWrite and Kate"
|
||||
[#]: via: "https://opensource.com/article/22/2/edit-text-linux-kde"
|
||||
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Edit text on Linux with KWrite and Kate
|
||||
======
|
||||
Two Linux KDE text editors. One powerful KTextEditor.
|
||||
![Person using a laptop][1]
|
||||
|
||||
A text editor is often a good example application to demonstrate what a programming framework is capable of producing. I myself have written at least three example text editors in articles about [wxPython and PyQt][2], and [Java][3]. The reason they're seen as easy apps to create is because the frameworks provide so much of the code that's hardest to write. I think that's also the reason that most operating systems provide a simple desktop text editor. They're useful to the user and easy for the developer.
|
||||
|
||||
On the KDE Plasma Desktop, there are two text editors to choose from: the humble KWrite and the powerful Kate. They share between them a library called KTextEditor from the KDE Framework, which provides robust text editing options, so no matter which one you choose you have more features than you're probably used to from a "basic" text editor that just happens to be included with your desktop. Using the same component for text editing across text editors means that once you grow accustomed to one text editing interface in KDE, you're essentially familiar with them all: KWrite, Kate, KDevelop, and more.
|
||||
|
||||
### Install KWrite or Kate
|
||||
|
||||
KWrite and Kate are maintained in the same [development repository][4].
|
||||
|
||||
However, they’re distributed as separate applications and have different use cases.
|
||||
|
||||
If you have KDE Plasma Desktop installed, you probably already have KWrite installed, but you may need to install Kate separately.
|
||||
|
||||
|
||||
```
|
||||
`$ sudo dnf install kwrite kate`
|
||||
```
|
||||
|
||||
KWrite is available from [apps.kde.org/kwrite][5], and Kate from [apps.kde.org/kate/][6].
|
||||
|
||||
Both can be installed through KDE Discover, and KWrite can be [installed as a flatpak][7].
|
||||
|
||||
### KWrite, the not-so-basic editor
|
||||
|
||||
Getting started with KWrite is easy. You launch it from your applications menu and you start typing. If you have no expectations that it's anything more than the most basic of text editors, then you can treat it as a simple digital notepad.
|
||||
|
||||
![The KWrite text editor][8]
|
||||
|
||||
(Seth Kenlon, [CC BY-SA 4.0][9], Text courtesy [Project Gutenberg][10])
|
||||
|
||||
All the usual conventions apply. Type text into the big text field, click the Save button when you're done.
|
||||
|
||||
However, what sets KWrite apart from a standard desktop editor is that it uses KTextEditor.
|
||||
|
||||
### Bookmarks
|
||||
|
||||
While you're working in KWrite or Kate, you can create temporary bookmarks to help you find important places in your document. To create a bookmark, press **Ctrl+B**. You can move to a bookmark by selecting it in the **Bookmark** menu.
|
||||
|
||||
Bookmarks aren't permanent metadata, and they don't get stored as part of your document, but they're useful devices when you're working and need to move back and forth between sections. In other text editors, I used to just type some random word, like _foobar,_ and then perform a **Find** on that string to get back to that location. Bookmarks are a more elegant solution for the problem, and they don't risk littering your document with placeholders that you could forget to delete.
|
||||
|
||||
### Highlighting
|
||||
|
||||
In both KWrite and Kate, you can activate syntax highlighting so you can gain insight about the text you're working on. You might not consciously use highlighting in other word processors, but you've seen a form of highlighting if you've ever used an editor with automated spelling and grammar checking. The red warning line that a misspelling gets marked with in most modern word processors is a form of syntax highlighting. KWrite and Kate can notify you of both errors and successes in your writing.
|
||||
|
||||
To see spelling errors, go to the **Tools** menu and select **Spelling**. From the **Spelling** submenu, activate **Automatic Spell Checking**.
|
||||
|
||||
To get visual feedback about what you're writing in a specific format, such as [Markdown][11], HTML, or a programming language like [Python][12], go to the **Tools** menu and select **Mode**. There are lots of modes, divided between several categories. Find the format you're writing in and select it. A mode loads in a highlighting schema. You can override a mode's highlighting scheme by choosing **Highlighting** instead of **Mode**.
|
||||
|
||||
![Text highlighting][13]
|
||||
|
||||
(Seth Kenlon, [CC BY-SA 4.0][9])
|
||||
|
||||
One of my favorite features is the document overview on the right side of the window. It's essentially a very very tall thumbnail of the whole document, so you can scroll to specific regions with just one click. It might look like it's too small to be useful, but it's easier than one might think to pinpoint a section heading or an approximate area within a document and get pretty close to it with a click.
|
||||
|
||||
### What sets Kate apart
|
||||
|
||||
With KWrite and Kate using the same underlying component, you might wonder why you'd ever need to graduate on from KWrite at all. If you do decide to try out Kate, you won't do it for the text editing. All the features that affect how you enter and interact with your text are the same between the two applications. However, Kate adds lots of features for coders.
|
||||
|
||||
![Coding in Kate][14]
|
||||
|
||||
(Seth Kenlon, [CC BY-SA 4.0][9])
|
||||
|
||||
Kate features a side panel where you can view your filesystem or just a project directory. Notably, Kate has the concept of projects, so it can correlate one file of code to, for instance, a header file in the same directory. It also has a pop-up Terminal (just press **F4**) and the ability to pipe text in your document out to the terminal session.
|
||||
|
||||
There's also a session manager so you can have a unique Kate configuration for different activities.
|
||||
|
||||
### Choose your Linux text editor
|
||||
|
||||
It's easy to overlook KWrite and Kate. They suffer, in a way, from the _default syndrome._ Because one or both of them comes along with the desktop, it's easy to think of them as the simple example text editors that developers are obligated to include. That's far from accurate, though. KWrite and Kate are paragons among K-apps. They exemplify what the KDE Framework provides, and they set the stage for an expectation of powerful, meaningful, and useful KDE applications.
|
||||
|
||||
Take a look at KWrite and Kate, and see which one is right for you.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/2/edit-text-linux-kde
|
||||
|
||||
作者:[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/laptop_screen_desk_work_chat_text.png?itok=UXqIDRDD (Person using a laptop)
|
||||
[2]: https://opensource.com/article/17/4/pyqt-versus-wxpython
|
||||
[3]: https://opensource.com/article/20/12/write-your-own-text-editor
|
||||
[4]: https://invent.kde.org/utilities/kate
|
||||
[5]: http://apps.kde.org/kwrite
|
||||
[6]: https://apps.kde.org/kate
|
||||
[7]: https://opensource.com/article/21/11/install-flatpak-linux
|
||||
[8]: https://opensource.com/sites/default/files/kwrite-ui.jpg (The KWrite text editor)
|
||||
[9]: https://creativecommons.org/licenses/by-sa/4.0/
|
||||
[10]: https://www.gutenberg.org/cache/epub/41445/pg41445.txt
|
||||
[11]: https://opensource.com/article/19/9/introduction-markdown
|
||||
[12]: https://opensource.com/article/17/10/python-101
|
||||
[13]: https://opensource.com/sites/default/files/kwrite-ui-mode.jpg (Text highlighting)
|
||||
[14]: https://opensource.com/sites/default/files/kate-ui.jpg (Coding in Kate)
|
@ -1,153 +0,0 @@
|
||||
[#]: subject: "How to Clean Up Snap Package Versions in Linux [Quick Tip]"
|
||||
[#]: via: "https://itsfoss.com/clean-snap-packages/"
|
||||
[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
How to Clean Up Snap Package Versions in Linux [Quick Tip]
|
||||
======
|
||||
|
||||
Snap packages are not everyone’s favorite but they are an integral part of the Ubuntu ecosystem.
|
||||
|
||||
It has its pros and cons. One of the negatives is that Snap packages are usually bigger in size and take a lot of disk space.
|
||||
|
||||
This could be a problem if you are running out of disk space, specially on the root partition.
|
||||
|
||||
Let me share a neat trick that you could use to cut down the disk spaced used by Snap packages.
|
||||
|
||||
### Cleaning up old Snap package versions to free disk space
|
||||
|
||||
The system files related to snap are stored in the /var/lib/snapd directory. Based on the number of Snap packages you have installed, this directory size could be in several GBs.
|
||||
|
||||
Don’t just take my word for it. Do an assesement by [using the du command to check the directory size.][1]
|
||||
|
||||
```
|
||||
|
||||
[email protected]:~$ sudo du -sh /var/lib/snapd
|
||||
5.4G /var/lib/snapd
|
||||
|
||||
```
|
||||
|
||||
You may also use the Disk Usage Analyzer GUI tool to see the [disk usage in Ubuntu][2].
|
||||
|
||||
![Snap disk usage][3]
|
||||
|
||||
That’s a lot, right? You could free up some disk space here.
|
||||
|
||||
By design, Snap keeps at least one older version of the packages you have installed on your system.
|
||||
|
||||
You can see this behavior by using the Snap command:
|
||||
|
||||
```
|
||||
|
||||
snap list --all
|
||||
|
||||
```
|
||||
|
||||
You should see the same package listed twice with different version and revision number.
|
||||
|
||||
![Snap keeps at least two versions of each package][4]
|
||||
|
||||
To free up disk space, you can delete the additional package versions. How do you know which one to delete? You can see that these older packages are labeled ‘disabled’.
|
||||
|
||||
Don’t worry. You don’t have to manually do it. There is sort of automatic way to do it thanks to a nifty bash script written by Alan Pope while he was working in the [Snapcraft][5] team.
|
||||
|
||||
I hope you know [how to create and run a bash shell script][6]. Basically, create a new file named clean-swap.sh and add the following lines to it.
|
||||
|
||||
```
|
||||
|
||||
#!/bin/bash
|
||||
# Removes old revisions of snaps
|
||||
# CLOSE ALL SNAPS BEFORE RUNNING THIS
|
||||
set -eu
|
||||
snap list --all | awk '/disabled/{print $1, $3}' |
|
||||
while read snapname revision; do
|
||||
snap remove "$snapname" --revision="$revision"
|
||||
done
|
||||
|
||||
```
|
||||
|
||||
Save it and close the editor.
|
||||
|
||||
To run this script, keep it in your home directory and then [open the terminal in Ubuntu][7] and run this command:
|
||||
|
||||
```
|
||||
|
||||
sudo bash clean-snap.sh
|
||||
|
||||
```
|
||||
|
||||
You can see that it starts removing the older version of packages.
|
||||
|
||||
![Removing old snap package versions][8]
|
||||
|
||||
If you check the disk space used by Snap now, you’ll see that the directory size is reduced now.
|
||||
|
||||
```
|
||||
|
||||
[email protected]:~$ sudo du -sh /var/lib/snapd
|
||||
3.9G /var/lib/snapd
|
||||
|
||||
```
|
||||
|
||||
If this works for you, you could run this command occasionally.
|
||||
|
||||
#### How does this script work?
|
||||
|
||||
If you are curious about what does this script do, let me explain.
|
||||
|
||||
You have already seen the output of the “snap list –all” command. It’s output is passed to the [awk command][9]. Awk is a powerful scripting tool.
|
||||
|
||||
The awk ‘/disabled/{print $1, $3}’ part looks for the string ‘disabled’ in each row and if it is found, it extracts the first column and third column.
|
||||
|
||||
This output is further passed to a combination of while and read command. Read command gets the value of first column snapname and third column to revision variable.
|
||||
|
||||
These variables are then used to run the snap remove command to delete with the name of the span package name and its revision number.
|
||||
|
||||
The while loop runs as long as there are rows found with ‘disabled’ string in it.
|
||||
|
||||
This all makes sense easily if you know a little bit about shell scripting. If you are not familiar with, we have a [bash tutorial series for beginners][10] for you.
|
||||
|
||||
### Did you get your GBs back?
|
||||
|
||||
You may see some forums advising to set up the Snap package retention value to 2.
|
||||
|
||||
```
|
||||
|
||||
sudo snap set system refresh.retain=2
|
||||
|
||||
```
|
||||
|
||||
I don’t think it’s needed anymore. Snap’s default behavior now is to store total 2 versions for any package.
|
||||
|
||||
Altogether, if you are running out of space, getting rid of the additional package version could surely one of the [ways to free up disk space on Ubuntu][11].
|
||||
|
||||
If this tutorial helped you free some space, let me know in the comment section.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/clean-snap-packages/
|
||||
|
||||
作者:[Abhishek Prakash][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://itsfoss.com/author/abhishek/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://linuxhandbook.com/find-directory-size-du-command/
|
||||
[2]: https://itsfoss.com/check-free-disk-space-linux/
|
||||
[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/snap-disk-usage.png?resize=800%2C323&ssl=1
|
||||
[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/snap-keeps-two-versions-of-each-package.png?resize=800%2C347&ssl=1
|
||||
[5]: https://snapcraft.io/
|
||||
[6]: https://itsfoss.com/run-shell-script-linux/
|
||||
[7]: https://itsfoss.com/open-terminal-ubuntu/
|
||||
[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/removing-old-snap-package-versions.png?resize=800%2C445&ssl=1
|
||||
[9]: https://linuxhandbook.com/awk-command-tutorial/
|
||||
[10]: https://linuxhandbook.com/tag/bash-beginner/
|
||||
[11]: https://itsfoss.com/free-up-space-ubuntu-linux/
|
@ -1,97 +0,0 @@
|
||||
[#]: subject: "Add, switch, delete, and manage Linux users in KDE"
|
||||
[#]: via: "https://opensource.com/article/22/2/manage-linux-users-kde"
|
||||
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Add, switch, delete, and manage Linux users in KDE
|
||||
======
|
||||
Maintaining separate users on a computer is a luxury, and a great way to
|
||||
keep your own data, and the data of those you care about, safe.
|
||||
![people in different locations who are part of the same team][1]
|
||||
|
||||
Sharing a computer in a household is usually a pretty casual affair. When you need the computer, you pick it up and start using it. It's simple in theory, and mostly works. That is, until you accidentally grab the common computer and accidentally post screenshots of your server's uptime to your partner's cooking blog. Then it's time for separate user accounts.
|
||||
|
||||
From the very beginning, Linux has been a multi-user system. It's designed to treat each user, so long as they log in, as a unique human being, with a desktop all their own, a unique web browser profile, access to their own documents and files, and so on. The KDE Plasma Desktop does a lot to make it easy to switch from one account to another, but first you must set up a user account for each person who you expect to use a computer. You might also set up a special account for guests (I call this account, pragmatically, **guest**.)
|
||||
|
||||
### Add a user in KDE
|
||||
|
||||
There are different ways to add users on Linux. One way is the sysadmins-style of [using the terminal][2]. This is very efficient when you have lots of users to add, and so you want to automate the process or just reduce the number of mouse clicks.
|
||||
|
||||
In the Plasma Desktop, though, you can add users with the **Users** application. **Users** is actually a control panel in **System Settings**, but you can launch it from your application menu as if it were a stand-alone app.
|
||||
|
||||
![Users in KDE System Settings][3]
|
||||
|
||||
(Seth Kenlon, [CC BY-SA 4.0][4])
|
||||
|
||||
To add a user, click the **Add New User** button at the bottom of the window.
|
||||
|
||||
![Adding a user in KDE][5]
|
||||
|
||||
(Seth Kenlon, [CC BY-SA 4.0][4])
|
||||
|
||||
Give the new user a name and a username. These can be the same thing, but the intent is that their name is their birth name, while their username is a simple handle they use for computing. For instance, my name is "Seth Kenlon", while my username is `seth`.
|
||||
|
||||
Designate the new user as either a standard user or an administrator. Standard users have full control over just their own environment. They can [install Flatpaks][6] and save data to their home directory, but they can't affect other users on the machine. This is one of the advantages of having user accounts. I don't suspect that anyone I allow to use my computer intends to delete data that's important to me, but accidents happen. By creating a separate user account for myself and my partner, I'm protecting each of our data, and I'm protecting each of us individually from accidentally moving a file or misplacing data that's important to the other.
|
||||
|
||||
An administrator can make systemwide changes. I usually reserve this for myself on my computer, and I expect my partner to reserve that role for herself on her own computer. At work, however, that role belongs to the IT department.
|
||||
|
||||
Create a password for the user. Once logged in, new users can change their passwords.
|
||||
|
||||
To finalize user creation, click the **Create** button.
|
||||
|
||||
### Switching users
|
||||
|
||||
There are two different ways to switch users at the desktop level. You can log out and then let the other user log in, or you can choose **Switch user** from the **Power / Sessions** category in your application menu.
|
||||
|
||||
![Switching users in KDE][7]
|
||||
|
||||
(Seth Kenlon, [CC BY-SA 4.0][4])
|
||||
|
||||
When a new user logs in, your desktop is "frozen" or paused, and a new desktop is brought up for the other user. All of your windows remain open. You can even switch users in the middle of a game (you should probably pause first if you're in the middle of combat), and when you switch back you can pick right up where you left off. Better still, all of your processes continue to run, too. So you can switch users while rendering video or compiling code, and when you switch back your video will have finished rendering, or your code will have finished compiling (provided enough time has elapsed.)
|
||||
|
||||
![Login][8]
|
||||
|
||||
(Seth Kenlon, [CC BY-SA 4.0][4])
|
||||
|
||||
### Deleting a user
|
||||
|
||||
When I have house guests, I often create a guest account for the duration of their stay, and then I remove the account once they've gone.
|
||||
|
||||
You can remove a user from your computer by deleting their user account. This removes all of their data, so **make sure that the user you're about to delete has migrated what they need off of the machine!
|
||||
|
||||
The **Delete User** button is located in each user account in the **Users** control panel, where you created the user in the first place.
|
||||
|
||||
![Deleting a user][9]
|
||||
|
||||
(Seth Kenlon, [CC BY-SA 4.0][4])
|
||||
|
||||
### Linux user management
|
||||
|
||||
Maintaining separate users on a computer is a luxury, and a great way to keep your own data, and the data of those you care about, safe. It allows each user to be unique, and to make the desktop their own. With Linux, it's easy and nondisruptive, so create users for friends, houseguests, and family members.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/2/manage-linux-users-kde
|
||||
|
||||
作者:[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/connection_people_team_collaboration.png?itok=0_vQT8xV (people in different locations who are part of the same team)
|
||||
[2]: https://www.redhat.com/sysadmin/linux-commands-manage-users
|
||||
[3]: https://opensource.com/sites/default/files/kde-users.jpg (Users in KDE System Settings)
|
||||
[4]: https://creativecommons.org/licenses/by-sa/4.0/
|
||||
[5]: https://opensource.com/sites/default/files/kde-users-add.jpg (Adding a user in KDE)
|
||||
[6]: https://opensource.com/article/21/11/install-flatpak-linux
|
||||
[7]: https://opensource.com/sites/default/files/kde-users-switch.jpg (Switching users in KDE)
|
||||
[8]: https://opensource.com/sites/default/files/kde-users-login.jpg (Login)
|
||||
[9]: https://opensource.com/sites/default/files/kde-users-delete.jpg (Deleting a user)
|
@ -0,0 +1,125 @@
|
||||
[#]: subject: "Crop and resize photos on Linux with Gwenview"
|
||||
[#]: via: "https://opensource.com/article/22/2/crop-resize-photos-gwenview-kde"
|
||||
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Crop and resize photos on Linux with Gwenview
|
||||
======
|
||||
Gwenview is an excellent photo editor for casual photographers to use on
|
||||
the Linux KDE desktop.
|
||||
![Polaroids and palm trees][1]
|
||||
|
||||
A good photo can be a powerful thing. It expresses what you saw in a very literal sense, but it also speaks to what you experienced. Little things say a lot: the angle you choose when taking the photo, how large something looms in the frame, and by contrast the absence of those conscious choices.
|
||||
|
||||
Photos are often not meant as documentation of what really happened, and instead they become insights into how you, the photographer, perceived what happened.
|
||||
|
||||
This is one of the reasons photo editing is so commonplace. When you're posting pictures to your online image gallery or social network, you shouldn't have to post a photo that doesn't accurately represent the feelings the photo encapsulates. But by the same token, you also shouldn't have to become a professional photo compositer just to crop out the random photo bomber who poked their head into your family snapshot at the last moment. If you're using KDE, you have a casual photo editor available in the form of Gwenview.
|
||||
|
||||
### Install Gwenview on Linux
|
||||
|
||||
If you're running the KDE Plasma Desktop, you probably already have Gwenview installed. If you don't have it installed, or you're using a different desktop and you want to try Gwenview, then you can install it with your package manager.
|
||||
|
||||
I recommend installing both Gwenview and the Kipi plugin set, which connects Gwenview with several online photo services so you can easily upload photos. On Fedora, Mageia, and similar distributions:
|
||||
|
||||
|
||||
```
|
||||
`$ sudo dnf install gwenview kipi-plugins`
|
||||
```
|
||||
|
||||
On Debian, Elementary, and similar:
|
||||
|
||||
|
||||
```
|
||||
`$ sudo apt install gwenview kipi-plugins`
|
||||
```
|
||||
|
||||
### Using Gwenview
|
||||
|
||||
Gwenview is commonly launched in one of two ways. You can click on an image file in Dolphin and choose to open it in Gwenview, or you can launch Gwenview and hunt for a photo in your folders with Gwenview acting more or less as your file manager. The first method is a direct method, great for previewing an image file quickly and conveniently. The second method you're likely to use when you're browsing through lots of photos, unsure of which version of a photo is the "right" one.
|
||||
|
||||
Regardless of how you launch Gwenview, the interface and functionality is the same: there's a workspace on the right, and a panel on the left.
|
||||
|
||||
![Gwenview][2]
|
||||
|
||||
(Seth Kenlon [CC BY-SA 4.0][3], Photo courtesy [Andrea De Santis][4])
|
||||
|
||||
Below the panel on the left, there are three tabs.
|
||||
|
||||
* Folders: Displays a tree view of the folders on your computer so you can browse your files for more photos.
|
||||
* Information: Provides metadata about the photo you're currently viewing.
|
||||
* Operations: Allows you to make small modifications to the current photo, such as rotating between landscape and portrait, resizing, and cropping.
|
||||
|
||||
|
||||
|
||||
Gwenview is always aware of the file system, so you can press the **Right** or **Left** **Arrow** on your keyboard to see the previous or next photo in a folder.
|
||||
|
||||
To leave the single-photo view and see all of the images in a folder, click the **Browse** button in the top toolbar.
|
||||
|
||||
![Browsing photos in a folder][5]
|
||||
|
||||
(Seth Kenlon, [CC BY-SA 4.0][3])
|
||||
|
||||
You can also have both views at the same time. Click the **Thumbnail Bar** button at the bottom of Gwenview to see the other images in your current folder as a filmstrip, with the currently selected photo in the main panel.
|
||||
|
||||
![Thumbnail view][6]
|
||||
|
||||
(Seth Kenlon, [CC BY-SA 4.0][3])
|
||||
|
||||
### Editing photos with Gwenview
|
||||
|
||||
Digital photos are pretty common, and so it's equally as common to need to make minor adjustments to a photo before posting it online or sharing it with friends. There are very good applications that can edit photos, and in fact one of the best of them is another KDE application called Krita (you can read about how I use it for photographs in my [Krita for photographers][7] article), but small adjustments shouldn't require an art degree. That's exactly what Gwenview ensures: easy and quick photo adjustments with a casual but powerful application that's integrated into the rest of your Plasma Desktop.
|
||||
|
||||
The most common adjustments most of us make to photos are:
|
||||
|
||||
* **Rotation**: When your camera doesn't provide the correct metadata for your computer to know whether a photo is meant to be viewed in landscape or portrait orientation, you can fix it manually.
|
||||
* **Mirror**: Many laptop or face cameras mimic a mirror, which is useful because that's how we're used to seeing ourselves. However, it renders writing backward. The **Mirror** function flips (or flops?) an image from right to left.
|
||||
* **Flip**: Less common with digital cameras and laptops, the phenomenon of taking a photo with an upside-down device is not uncommon with a mobile phone with a screen that flips no matter how you're holding your phone. The **Flip** function rotates an image 180 degrees.
|
||||
* **Resize**: Digital images are often in super HD sizes now, and sometimes that's a lot more than you need. If you're sending a photo by email or posting it on a web page you want to optimize for loading time, you can shrink the dimensions (and file size accordingly) to something smaller.
|
||||
* **Crop**: You have a great picture of yourself, and accidentally a random person you thought was just out of frame. Cut out everything you don't want in frame with the **Crop** tool.
|
||||
* **Red** **Eye**: When your retinas reflect the flash of your camera back into the camera, you get a red eye effect. Gwenview can reduce this by desaturating and darkening the red channel in an adjustable area.
|
||||
|
||||
|
||||
|
||||
All of these tools are available in the **Operations** side panel or in the **Edit** menu. The operations are destructive, so after you make a change, click **Save As** to save a _copy_ of the image.
|
||||
|
||||
![Cropping a photo in Gwenview][8]
|
||||
|
||||
(Seth Kenlon, [CC BY-SA 4.0][3], Photo courtesy [Elise Wilcox][9])
|
||||
|
||||
### Sharing photos
|
||||
|
||||
When you're ready to share a photo, click the **Share** button in the top toolbar, or go to the **Plugins** menu and select **Export**. Gwenview, along with the Kipi plug-in set, can share photos with [Nextcloud][10], [Piwigo][11], plain old email, and services like Google Drive, Flickr, Dropbox, and more.
|
||||
|
||||
### Photo editing essentials on Linux
|
||||
|
||||
Gwenview has all the essentials for a desktop photo manager. If you need more than the basics, you can open a photo in Krita or [Digikam][12] and make major modifications as needed. For everything else, from browsing, ranking, tagging, and small adjustments, you have Gwenview close at hand.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/2/crop-resize-photos-gwenview-kde
|
||||
|
||||
作者:[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/design_photo_art_polaroids.png?itok=SqPLgWxJ (Polaroids and palm trees)
|
||||
[2]: https://opensource.com/sites/default/files/kde-gwenview-ui.jpg (Gwenview)
|
||||
[3]: https://creativecommons.org/licenses/by-sa/4.0/
|
||||
[4]: http://unsplash.com/@santesson89
|
||||
[5]: https://opensource.com/sites/default/files/kde-gwenview-browse.jpg (Browsing photos in a folder)
|
||||
[6]: https://opensource.com/sites/default/files/kde-gwenview-thumbnail.jpg (Thumbnail view)
|
||||
[7]: https://opensource.com/article/21/12/open-source-photo-editing-krita
|
||||
[8]: https://opensource.com/sites/default/files/kde-gwenview-crop.jpg (Cropping a photo in Gwenview)
|
||||
[9]: http://unsplash.com/@elise_outside
|
||||
[10]: https://opensource.com/article/20/7/nextcloud
|
||||
[11]: https://opensource.com/alternatives/google-photos
|
||||
[12]: https://opensource.com/life/16/5/how-use-digikam-photo-management
|
@ -0,0 +1,244 @@
|
||||
[#]: subject: "Transform Your Arch Installation with Stunning XMonad WM Setup"
|
||||
[#]: via: "https://www.debugpoint.com/2022/02/xmonad-arch-linux-setup/"
|
||||
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Transform Your Arch Installation with Stunning XMonad WM Setup
|
||||
======
|
||||
THIS ARTICLE GIVES YOU A STEP-BY-STEP INSTALLATION GUIDE FOR THE XMONAD
|
||||
SETUP IN ARCH LINUX WITH A CUSTOM PRE-CONFIGURED SCRIPT.
|
||||
### What is XMonad
|
||||
|
||||
The [xmonad][1] is a dynamic tiling window manager for X Window system written in Haskell programming language. It is famous for its window automation, stability, minimal, workspace features, and more unique features. With features like – multiple display support, auto window tiling management, quick keyboard navigation, extension support, this window manager is one of the popular choices for those users who wants a productive and faster working system.
|
||||
|
||||
You can learn more about this window manager at [https://xmon][1][ad.org/][1].
|
||||
|
||||
![xmonad window manager in Arch Linux -1][2]
|
||||
|
||||
### XMomad Setup in Arch Linux
|
||||
|
||||
#### How to Install
|
||||
|
||||
This guide assumes that you have a functional Arch Linux system ready to follow the below steps. If you want to install Arch Linux, then you can follow our guides as below:
|
||||
|
||||
* [How to Install Arch Linux via archinstall (recommended)][3]
|
||||
* [How to Install Arch Linux (basics)][4]
|
||||
|
||||
|
||||
|
||||
For this guide, we will use [Axarva’s pre-configured xmonad script][5], which comes with xmonad, Eww (Elkowars Wacky Widgets is a standalone widget system made in Rust), rofi (window switcher), tint2 (panels and taskbar) and some cool widgets. This guide is only for physical systems and not virtual machines.
|
||||
|
||||
Using this personal script is best for novice Arch Linux users because it is unnecessary to go through the hassles of choosing and installing each of the above components and configure them separately.
|
||||
|
||||
* Ensure that you are logged on to the Arch Linux system as an admin user (preferable). And connected to the internet.
|
||||
|
||||
|
||||
* In the terminal prompt, install the following components while in the home directory.
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
sudo pacman -Syu base-devel git nano
|
||||
|
||||
```
|
||||
|
||||
* Wait for the download to complete. Then clone the following [Axarva’s repo][5] from GitHub.
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
git clone https://github.com/Axarva/dotfiles-2.0.git
|
||||
|
||||
```
|
||||
|
||||
* After the above command is complete, browse to the dotfiles-2.0 directory. Here you should see a script – `install-on-arch.sh`. Give the execute permission on this script and run. All these you can do with the below set of commands.
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
cd ./dotfiles-2.0
|
||||
chmod +x ./install-on-arch.sh
|
||||
./install-on-arch.sh
|
||||
|
||||
```
|
||||
|
||||
The above script will take some time to complete. It will download all the required packages for xmonad setup in Arch Linux. And at the end, the script will compile the entire source code that you downloaded in the first step, including xmonad and other additional utilities.
|
||||
|
||||
While executing, it would ask for input from you for some cases. Enter the values as per your system configuration and your preferences.
|
||||
|
||||
The script will ask whether your video card type is Intel, Nvidia, etc. Choose the correct option for your system. Also, when asked for the system resolution, choose the appropriate one. If you are not sure, choose the lower resolution option.
|
||||
|
||||
![Choose Graphics card type][6]
|
||||
|
||||
Choose yay (recommended). You can also choose paru if you wish. The installation of paru would take additional time due to rust download and setup. In that comparison, yay is faster and requires less time to install. An AUR (Arch User Repo) helper is also needed to compile some packages.
|
||||
|
||||
![Installing AUR Helper][7]
|
||||
|
||||
Congratulations if you reached this far. It’s time for some configuration. Once the installation is complete, you should see the below prompt.
|
||||
|
||||
![Xmonad installation is complete][8]
|
||||
|
||||
#### Configuring XMonad
|
||||
|
||||
Installing the xmonad window manager is not sufficient. You have to tell the Arch system where it should pick the executables and widgets. Also, you have to manually configure to tell X Windows server to execute the main xmonad binary. When you use a stacking window system (such as GNOME, KDE Plasma, etc.), the display manager (such as lightdm) takes care of this.
|
||||
|
||||
* Open the `~/.bashrc` file from the terminal prompt and append the $HOME/bin.
|
||||
|
||||
|
||||
|
||||
![Updating bashrc file][9]
|
||||
|
||||
* Open the `~/.bash_profile` file and add startx at the beginning to start the xserver when logging in. Save and exit from the file.
|
||||
|
||||
|
||||
|
||||
![Updating bash_profile file][10]
|
||||
|
||||
* Open `~/.xinitrc` file and add `exec xmonad`. This file is new. Save the file once you add the command.
|
||||
|
||||
|
||||
|
||||
![Create xinitrc file][11]
|
||||
|
||||
* The steps are almost complete, open the `~/dotfiles-2.0/.config/alacritty.yml` file and change the font size for the terminal to something larger than the default value of 9. This is an optional step, but it’s better to change this. Save and close the file.
|
||||
|
||||
|
||||
* Exit and log in again. And if all goes well, you should see a default xmonad desktop as below. Now, if you like to configure further such as installing applications and other steps, proceed to the next step.
|
||||
|
||||
|
||||
|
||||
![xmonad base install in Arch Linux – before configuration][12]
|
||||
|
||||
### Configure the desktop
|
||||
|
||||
The default install in this process gives you a basic setup without the necessary applications to perform day to day tasks.
|
||||
|
||||
[][13]
|
||||
|
||||
SEE ALSO: How to Install yay AUR Helper in Arch Linux [Beginner’s Guide]
|
||||
|
||||
Here, I have compiled a list of some famous and essential software for this setup. This step is optional, and you can install something else as you wish. However, you can install using the command that follows this list.
|
||||
|
||||
* Ristretto – Image viewer
|
||||
* Feh – for changing wallpaper
|
||||
* Firefox – Web Browser
|
||||
* Gimp – Image processing and editor
|
||||
* leafpad – simple text editor
|
||||
* Thunar – File manager
|
||||
* KSnip – Screenshot tool
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
pacman -S gtklib firefox leafpad libreoffice thunar ksnip ristretto gimp feh gvfs polkit-gnome
|
||||
|
||||
```
|
||||
|
||||
The gvfs and polkit-gnome packages are for Thunar and detect USB drives.
|
||||
|
||||
Once the applications are installed, you can add them to the bottom panel using the `tint2conf` utility. Using this utility, you can also change other desktop components, which you can figure out as you start using it.
|
||||
|
||||
Open a terminal by `Meta + Shift + Enter` key combination. Meta key is the Windows key in your keyboard in general. Then type `tint2conf` and configure the panel.
|
||||
|
||||
You can also download a nice wallpaper and set it up using `feh`.
|
||||
|
||||
![xmonad window manager in Arch Linux -2][14]
|
||||
|
||||
Being a tiling window manager, most of the activities you need to perform via keyboard combinations.
|
||||
|
||||
Here’s a quick reference for you (via [github][15])
|
||||
|
||||
Keybind | Function
|
||||
---|---
|
||||
Meta + Shift + Enter | Launch terminal (alacritty)
|
||||
Meta + Shift + C | Close window
|
||||
Win + O | Open rofi menu
|
||||
Win + Shift + Q | Open rofi powermenu
|
||||
Win + S | Open sidebar
|
||||
Win + Shift + S | Close sidebar
|
||||
Win + P | Open dashboard
|
||||
Win + Shift + P | Close dashboard
|
||||
Win + B | Toggle the main bars
|
||||
Win + Z | Activate inhibitor (Stops autolocking)
|
||||
Win + Shift + Z | Dectivate inhibitor (Enables autolocking)
|
||||
Win + Ctrl + G | Toggle gaps (toggle to get screen space)
|
||||
Win + J | Navigate through windows
|
||||
Win + K | Navigate through windows
|
||||
Win + Space | Switch through layouts
|
||||
Win + T | Make a floating window tiled
|
||||
|
||||
### Performance
|
||||
|
||||
These configurations and scripts mean nothing is performance is not up to the mark. So, I thought of testing the performance of the xmonad setup in Arch Linux.
|
||||
|
||||
My older test machine (i3, 4GB RAM, SSD, NVIDIA 340) performs fairly. I felt some performance lag, primarily because of the NVIDIA 340 driver, which is unavailable in Arch repo. But I am sure it would perform much faster if you tested it in newer hardware.
|
||||
|
||||
That said, during idle state, it consumed approximately 820 MB of RAM and CPU at 10% to 13%. Surprisingly it’s a little higher in my test for an idle state.
|
||||
|
||||
![xmonad performance in Arch Linux during idle state][16]
|
||||
|
||||
With that idle state metrics, I was curious about the heavy workload. So, I opened Firefox (1 tab), GIMP, Thunar, Text editor and Screenshot tool. The memory consumption shot up to 1.1 GB, and the CPU is average at 20%.
|
||||
|
||||
![xmonad performance in Arch Linux during heavy workflow state][17]
|
||||
|
||||
Overall, I think it’s using a little more resources, although it was supposed to consume less because it’s a window manager. Probably I need to test it in newer hardware.
|
||||
|
||||
Enjoy your xmonad setup with Arch Linux!
|
||||
|
||||
### Closing Notes
|
||||
|
||||
The xmonad is undoubtedly one of the beautiful window managers when adequately configured with several widgets. You can go ahead and try it in a physical system if you love window managers. And when appropriately configured, you can easily use it for your daily driver.
|
||||
|
||||
With that said, I hope this guide helps you to set up your xmonad window manager in [Arch Linux][18]. If you have any questions, let me know in the comment box below.
|
||||
|
||||
Cheers.
|
||||
|
||||
* * *
|
||||
|
||||
We bring the latest tech, software news and stuff that matters. Stay in touch via [Telegram][19], [Twitter][20], [YouTube][21], and [Facebook][22] and never miss an update!
|
||||
|
||||
##### Also Read
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.debugpoint.com/2022/02/xmonad-arch-linux-setup/
|
||||
|
||||
作者:[Arindam][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.debugpoint.com/author/admin1/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://xmonad.org/
|
||||
[2]: https://www.debugpoint.com/wp-content/uploads/2022/02/xmonad-window-manager-in-Arch-Linux-1-1024x575.jpg
|
||||
[3]: https://www.debugpoint.com/2022/01/archinstall-guide/
|
||||
[4]: https://www.debugpoint.com/2020/11/install-arch-linux/
|
||||
[5]: https://github.com/Axarva/dotfiles-2.0
|
||||
[6]: https://www.debugpoint.com/wp-content/uploads/2022/02/Choose-Video-Card-type.jpg
|
||||
[7]: https://www.debugpoint.com/wp-content/uploads/2022/02/Installing-AUR-Helper.jpg
|
||||
[8]: https://www.debugpoint.com/wp-content/uploads/2022/02/Xmonad-installation-is-complete-1024x212.jpg
|
||||
[9]: https://www.debugpoint.com/wp-content/uploads/2022/02/Updating-bashrc-file.jpg
|
||||
[10]: https://www.debugpoint.com/wp-content/uploads/2022/02/Updating-bash_profile-file.jpg
|
||||
[11]: https://www.debugpoint.com/wp-content/uploads/2022/02/Create-xinitrc-file.jpg
|
||||
[12]: https://www.debugpoint.com/wp-content/uploads/2022/02/xmonad-base-install-in-Arch-Linux-before-configuration-1024x577.jpg
|
||||
[13]: https://www.debugpoint.com/2021/01/install-yay-arch/
|
||||
[14]: https://www.debugpoint.com/wp-content/uploads/2022/02/xmonad-window-manager-in-Arch-Linux-2-1024x575.jpg
|
||||
[15]: https://github.com/Axarva/dotfiles-2.0#keybinds-%EF%B8%8F
|
||||
[16]: https://www.debugpoint.com/wp-content/uploads/2022/02/xmonad-performance-in-Arch-Linux-during-idle-state-1024x575.jpg
|
||||
[17]: https://www.debugpoint.com/wp-content/uploads/2022/02/xmonad-performance-in-Arch-Linux-during-heavy-workflow-state-1024x575.jpg
|
||||
[18]: https://www.debugpoint.com/tag/arch-linux
|
||||
[19]: https://t.me/debugpoint
|
||||
[20]: https://twitter.com/DebugPoint
|
||||
[21]: https://www.youtube.com/c/debugpoint?sub_confirmation=1
|
||||
[22]: https://facebook.com/DebugPoint
|
@ -0,0 +1,219 @@
|
||||
[#]: subject: "3 steps to start running containers today"
|
||||
[#]: via: "https://opensource.com/article/22/2/start-running-containers"
|
||||
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
3 steps to start running containers today
|
||||
======
|
||||
In this tutorial, you will learn how to run two containers in a pod to
|
||||
host a WordPress site.
|
||||
![Shipping containers stacked][1]
|
||||
|
||||
Whether you're interested in them as part of your job, for future job opportunities, or just out of interest in new technology, containers can seem pretty overwhelming to even an experienced systems administrator. So how do you actually get started with containers? And what's the path from containers to [Kubernetes][2]? Also, why is there a path from one to the other at all? As you might expect, the best place to start is the beginning.
|
||||
|
||||
### 1\. Understanding containers
|
||||
|
||||
On second thought, starting at the beginning arguably dates back to early BSD and their special chroot jails, so skip ahead to the middle instead.
|
||||
|
||||
Not so very long ago, the Linux kernel introduced _cgroups_, which enables you to "tag" processes with something called a _namespace_. When you group processes together into a namespace, those processes act as if nothing outside that namespace exists. It's as if you've put those processes into a sort of container. Of course, the container is virtual, and it exists inside your computer. It runs on the same kernel, RAM, and CPU that the rest of your operating system is running on, but you've contained the processes.
|
||||
|
||||
Pre-made containers get distributed with just what's necessary to run the application it contains. With a container engine, like [Podman][3], Docker, or CRI-O, you can run a containerized application without installing it in any traditional sense. Container engines are often cross-platform, so even though containers run Linux, you can launch containers on Linux, macOS, or Windows.
|
||||
|
||||
More importantly, you can run more than one container of the same application when there's high demand for it.
|
||||
|
||||
Now that you know what a container is. The next step is to run one.
|
||||
|
||||
**[ Get the cheat sheet: [What’s the difference between a pod, a cluster, and a container?][4] ]**
|
||||
|
||||
### 2\. Run a container
|
||||
|
||||
Before running a container, you should have a reason for running a container. You can make up a reason, but it's helpful for that reason to interest you, so you're inspired actually to use the container you run. After all, running a container but never using the application it provides only proves that you're not noticing any failures, but using the container demonstrates that it works.
|
||||
|
||||
I recommend WordPress as a start. It's a popular web application that's easy to use, so you can test drive the app once you've got the container running. While you can easily set up a WordPress container, there are many configuration options, which can lead you to discover more container options (like running a database container) and how containers communicate.
|
||||
|
||||
I use Podman, which is a friendly, convenient, and daemonless container engine. If you don't have Podman available, you can use the Docker command instead. Both are great open source container engines, and their syntax is identical (just type `docker` instead of `podman`). Because Podman doesn't run a daemon, it requires more setup than Docker, but the ability to run rootless daemonless containers is worth it.
|
||||
|
||||
If you're going with Docker, you can skip down to the [WordPress subheading][5]. Otherwise, open a terminal to install and configure Podman:
|
||||
|
||||
|
||||
```
|
||||
`$ sudo dnf install podman`
|
||||
```
|
||||
|
||||
Containers spawn many processes, and normally only the root user has permission to create thousands of process IDs. Add some extra process IDs to your user by creating a file called `/etc/subuid` and defining a suitably high start UID with a suitable large number of permitted PIDs:
|
||||
|
||||
|
||||
```
|
||||
`seth:200000:165536`
|
||||
```
|
||||
|
||||
Do the same for your group in a file called `/etc/subgid`. In this example, my primary group is `staff` (it may be `users` for you, or the same as your username, depending on how you've configured your system.)
|
||||
|
||||
|
||||
```
|
||||
`staff:200000:165536`
|
||||
```
|
||||
|
||||
Finally, confirm that your user is also permitted to manage thousands of namespaces:
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
$ sysctl --all --pattern user_namespaces
|
||||
user.max_user_namespaces = 28633
|
||||
|
||||
```
|
||||
|
||||
If your user doesn't have permission to manage at least 28,000 namespaces, increase the number by creating the file `/etc/sysctl.d/userns.conf` and enter:
|
||||
|
||||
|
||||
```
|
||||
`user.max_user_namespaces=28633`
|
||||
```
|
||||
|
||||
#### Running WordPress as a container
|
||||
|
||||
Now, whether you're using Podman or Docker, you can pull a WordPress container from a container registry online and run it. You can do all this with a single Podman command:
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
$ podman run --name mypress \
|
||||
-p 8080:80 -d wordpress
|
||||
|
||||
```
|
||||
|
||||
Give Podman a few moments to find the container, copy it from the internet, and start it up.
|
||||
|
||||
Start a web browser once you get a terminal prompt back and navigate to `localhost:8080`. WordPress is running, waiting for you to set it up.
|
||||
|
||||
![WordPress running in a container][6]
|
||||
|
||||
(Seth Kenlon, [CC BY-SA 4.0][7])
|
||||
|
||||
It doesn't take long to reach your next hurdle, though. WordPress uses a database to keep track of data, so you need to provide it with a database where it can store its information.
|
||||
|
||||
Before continuing, stop and remove the WordPress container:
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
$ podman stop mypress
|
||||
$ podman rm mypress
|
||||
|
||||
```
|
||||
|
||||
### 3\. Run containers in a pod
|
||||
|
||||
Containers are, by design and, as their name suggests, self-contained. An application running in a container isn't supposed to interact with applications or infrastructure outside of its container. So when one container requires another container to function, one solution is to put those two containers inside a bigger container called a _pod_. A pod ensures that its containers can share important namespaces to communicate with one another.
|
||||
|
||||
Create a new pod, providing a name for the pod and which ports you want to be able to access:
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
$ podman pod create \
|
||||
\--name wp_pod \
|
||||
\--publish 8080:80
|
||||
|
||||
```
|
||||
|
||||
Confirm that the pod exists:
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
$ podman pod list
|
||||
POD ID NAME STATUS INFRA ID # OF CONTAINERS
|
||||
100e138a29bd wp_pod Created 22ace92df3ef 1
|
||||
|
||||
```
|
||||
|
||||
#### Add a container to a pod
|
||||
|
||||
Now that you have a pod for your interdependent containers, you launch each container by specifying a pod for it to run in.
|
||||
|
||||
First, launch a database. You can make up your own credentials as long as you use those same credentials when connecting to the database from WordPress.
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
$ podman run --detach \
|
||||
\--pod wp_pod \
|
||||
\--restart=always \
|
||||
-e MYSQL_ROOT_PASSWORD="badpassword0" \
|
||||
-e MYSQL_DATABASE="wp_db" \
|
||||
-e MYSQL_USER="tux" \
|
||||
-e MYSQL_PASSWORD="badpassword1" \
|
||||
\--name=wp_db mariadb
|
||||
|
||||
```
|
||||
|
||||
Next, launch the WordPress container into the same pod:
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
$ podman run --detach \
|
||||
\--restart=always --pod=wp_pod \
|
||||
-e WORDPRESS_DB_NAME="wp_db" \
|
||||
-e WORDPRESS_DB_USER="tux" \
|
||||
-e WORDPRESS_DB_PASSWORD="badpassword1" \
|
||||
-e WORDPRESS_DB_HOST="127.0.0.1" \
|
||||
\--name mypress wordpress
|
||||
|
||||
```
|
||||
|
||||
Now launch your favorite web browser and navigate to `localhost:8080`.
|
||||
|
||||
This time, the setup goes as expected. WordPress connects to the database because you've passed those environment variables while launching the container.
|
||||
|
||||
![WordPress setup][8]
|
||||
|
||||
(Seth Kenlon, [CC BY-SA 4.0][7])
|
||||
|
||||
After you've created a user account, you can log in to see the WordPress dashboard.
|
||||
|
||||
![WordPress dashboard running in a container][9]
|
||||
|
||||
(Seth Kenlon, [CC BY-SA 4.0][7])
|
||||
|
||||
### Next steps
|
||||
|
||||
You've created two containers, and you've run them in a pod. You know enough now to run services in containers on your own server. If you want to move to the cloud, containers are, of course, well-suited for that. With tools like Kubernetes and OpenShift, you can automate the process of launching [containers and pods on a cluster][10]. If you're thinking about taking the next step, read [3 ways to get started with Kubernetes][11] by Kevin Casey, and give the Minikube tutorial he mentions a try.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/2/start-running-containers
|
||||
|
||||
作者:[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/bus-containers.png?itok=d_4QhZxT (Shipping containers stacked)
|
||||
[2]: https://opensource.com/tags/kubernetes
|
||||
[3]: https://www.redhat.com/sysadmin/podman-guides-2020
|
||||
[4]: https://enterprisersproject.com/cheat-sheet-what-s-difference-between-pod-cluster-and-container
|
||||
[5]: tmp.1zBHYsK8TH#wp
|
||||
[6]: https://opensource.com/sites/default/files/uploads/podman-wordpress.jpg (WordPress running in a container)
|
||||
[7]: https://creativecommons.org/licenses/by-sa/4.0/
|
||||
[8]: https://opensource.com/sites/default/files/uploads/wordpress-setup.jpg (WordPress setup)
|
||||
[9]: https://opensource.com/sites/default/files/uploads/wordpress-welcome.jpg (WordPress dashboard running in a container)
|
||||
[10]: https://enterprisersproject.com/article/2020/9/pod-cluster-container-what-is-difference
|
||||
[11]: https://enterprisersproject.com/article/2019/11/kubernetes-3-ways-get-started
|
@ -0,0 +1,141 @@
|
||||
[#]: subject: "4 levels of DevOps documentation maturity"
|
||||
[#]: via: "https://opensource.com/article/22/2/devops-documentation-maturity"
|
||||
[#]: author: "Will Kelly https://opensource.com/users/willkelly"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
4 levels of DevOps documentation maturity
|
||||
======
|
||||
DevOps documentation requires a similar journey as you went through to
|
||||
reach DevOps or DevSecOps maturity.
|
||||
![Green graph of measurements][1]
|
||||
|
||||
DevOps and DevSecOps require agile documentation practices to deliver quality documentation on time with an iterative software delivery cycle. It's a similar journey to DevOps with a move to automation and a more agile approach to content. If documentation is only now entering your organization's DevOps discussions, it's time to catch your documentation practices up to DevOps.
|
||||
|
||||
Here are the four levels of DevOps documentation maturity:
|
||||
|
||||
### Level 1: Ad hoc and siloed
|
||||
|
||||
In the first level of DevOps documentation maturity (most immature), documentation efforts do not align with DevOps efforts. DevOps development follows their path while the documentation team follows a separate path, which often causes the documentation to be behind the development. Delaying a product launch because of documentation is not an option in the hyper-competitive cloud world.
|
||||
|
||||
#### Staffing
|
||||
|
||||
The documentation staffing at this level hasn't deviated from the old way of doing things. Technical writers still work in a centralized team detached from the development teams. A gulf between the technical writing group and development teams happens for a variety of reasons, including:
|
||||
|
||||
* Corporate politics that create team divisions and silos
|
||||
* The team sees technical documentation as a checkmark, not an asset that creates project success
|
||||
* The hiring of technical writers in an afterthought
|
||||
* Misalignment of technical writer priorities with development team realities
|
||||
|
||||
|
||||
|
||||
Another sign of staffing challenges at this phase is the "definition of done." This is where technical writers new to the agile experience may find it challenging working with applications developed through the iteration that continuous integration/continuous development (CI/CD) toolchains and processes.
|
||||
|
||||
#### Documentation tools and processes
|
||||
|
||||
Technical writers in this phase use tools they're used to from traditional office work, such as office suites and layout programs. The tools aren't agile and require version control, and content management requirements don't integrate efficiently with DevOps toolchains or support development velocity. Technical writers still follow legacy templates and processes at this level.
|
||||
|
||||
#### Outcomes
|
||||
|
||||
The documentation deliverables at this level may not be current or even lack technical accuracy. When a development team moves at the velocity of DevOps and their technical writer support follows a legacy non-agile process (using proprietary tools and delivery formats), it is difficult to iterate the documentation and keep pace with application changes.
|
||||
|
||||
### Level 2: Experimentation and pilot
|
||||
|
||||
The second level of DevOps documentation maturity (experimentation phase) is where DevOps leads and technical writers make the first moves to implement more agile documentation practices and tools.
|
||||
|
||||
Ideally, experimentation is part of a pilot project with support from stakeholders who have the most to gain from improved documentation delivery and its integration with DevOps practices.
|
||||
|
||||
#### Staffing
|
||||
|
||||
The staffing at the experimental phase can take one of three forms:
|
||||
|
||||
1. A forward-thinking technical writer experimenting with more agile tools on their own time brings their findings to work because they want a better way to do their job. The writer pitches the idea of a more agile documentation process to their leadership.
|
||||
2. The DevOps lead or engineer is experimenting with tools such as Hugo and Jekyll and integrating the tool into the CI/CD pipeline. The DevOps team teaches the tooling to the technical writer.
|
||||
3. The team brings in third-party contractors or consultants with expertise in DevOps documentation tools and knowledge of where documentation tools fit into the CI/CD toolchain and DevOps lifecycle.
|
||||
|
||||
|
||||
|
||||
#### Documentation tools & practices
|
||||
|
||||
[Hugo][2] and [Jekyll][3] are among the tools that appear during this phase. This phase also sees new approaches to content strategy and technical writing.
|
||||
|
||||
#### Outcomes
|
||||
|
||||
An outcome of a successful experimentation phase should be "land and expand" and set up DevOps documentation practices that other project teams can put into practice.
|
||||
|
||||
Experimentation in this phase also includes fundamental changes to content strategy and publishing processes, which technical writers outside the pilot project can learn and adopt.
|
||||
|
||||
A change in [technical writer hiring practices][4] is another potential outcome of this phase based on the pilot's success. It's essential to bring your in-house writers along by offering them training about DevOps and your newly implemented documentation tools.
|
||||
|
||||
New documentation tooling and processes are the critical outcomes for this phase. You'll also need to sell this outcome to your leadership, stakeholders, and other teams through presentations, status reports, and internal case studies.
|
||||
|
||||
### Level 3: Partial automation and expansion
|
||||
|
||||
The third level of DevOps documentation maturity (partial automation and expansion) is the next step in the "land and expand" outcome. In this phase, other DevOps teams adopt the DevOps documentation tools, practices, and lessons learned from the pilot project.
|
||||
|
||||
#### Staffing
|
||||
|
||||
Technical writers and DevOps teams begin a much closer collaboration at this level. Hiring new technical writers at this level focuses on writers with experience in DevOps environments.
|
||||
|
||||
#### Tools and documentation practices
|
||||
|
||||
Technical writers begin to migrate away from their legacy tools and processes and adopt more agile documentation tools during this phase, such as:
|
||||
|
||||
* [docToolchain][5]
|
||||
* [Docbook][6]
|
||||
* Hugo
|
||||
* Jekyll
|
||||
|
||||
|
||||
|
||||
Technical writers also work to adjust their legacy practices at this level.
|
||||
|
||||
#### Outcomes
|
||||
|
||||
DevOps documentation tools and practices expand beyond the pilot project(s) to become standard practices. Continuous learning is essential at this level as new teams go live with new documentation tools and processes.
|
||||
|
||||
### Level 4: Full adoption
|
||||
|
||||
The highest level of DevOps documentation maturity (full adoption and automation) is where the tools, practices, and processes are in place to support documentation as a top-level project priority. Reaching this level of maturity requires experimentation, iteration, and collaboration.
|
||||
|
||||
#### Staffing
|
||||
|
||||
Full automation brings together the closest collaboration between the DevOps team and technical writers. A mark of this phase is that your technical writers become firmly embedded into the project team's workflow. Large enterprises with engineers assigned to maintain DevOps toolchains assume maintenance duties over the documentation tools.
|
||||
|
||||
#### Documentation tools and practices
|
||||
|
||||
Technical writers at this level of maturity are standardized on markdown language and automated tools.
|
||||
|
||||
#### Outcomes
|
||||
|
||||
The outcomes at this phase are a complete suite of tools and practices that support the automation of online documentation publishing. Technical writers can publish and republish documentation as needed to support an iterative development process.
|
||||
|
||||
Continuous learning is another outcome of this phase. Technical writers and toolchain maintainers seek ways to improve automation and processes that help documentation practices.
|
||||
|
||||
### Final thoughts
|
||||
|
||||
DevOps documentation requires a similar journey as you went through to reach DevOps or DevSecOps maturity. I hope to reach a point across industries where moving to more agile documentation practices and tools becomes part of an organization's overall DevOps journey. There is still work to be done. Advancing your DevOps documentation maturity should come as part of your overall DevOps maturity or even [DevOps to DevSecOps transformation][7].
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/2/devops-documentation-maturity
|
||||
|
||||
作者:[Will Kelly][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/willkelly
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/metrics_lead-steps-measure.png?itok=DG7rFZPk (Green graph of measurements)
|
||||
[2]: https://opensource.com/article/18/3/start-blog-30-minutes-hugo
|
||||
[3]: https://opensource.com/article/17/4/getting-started-jekyll
|
||||
[4]: https://opensource.com/article/19/11/hiring-technical-writers-devops
|
||||
[5]: http://doctoolchain.org/
|
||||
[6]: https://opensource.com/article/17/9/docbook
|
||||
[7]: https://opensource.com/article/21/10/devops-to-devsecops
|
@ -0,0 +1,207 @@
|
||||
[#]: subject: "Internxt is an Open Source Encrypted Cloud Service With Native Linux Client"
|
||||
[#]: via: "https://itsfoss.com/internxt-cloud-service/"
|
||||
[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Internxt is an Open Source Encrypted Cloud Service With Native Linux Client
|
||||
======
|
||||
|
||||
There are a [handful of cloud services available for Linux users][1] that provide native applications.
|
||||
|
||||
Dropbox is one of the oldest and most popular. Then there is Mega and pCloud. Google has shamelessly decided not to create a Google Drive client for Linux.
|
||||
|
||||
You may also [self-host Nextcloud][2] or Seafile, but that’s not everyone’s cup of tea.
|
||||
|
||||
Recently, I was approached by another cloud storage provider called [Internxt][3]. I asked if they provide a desktop application for Linux users, and the answer was yes. I also found that [they are open source][4] on both the server and client-side.
|
||||
|
||||
Delighted, I installed Internxt on my Ubuntu system, and here, I will share my experience.
|
||||
|
||||
### Internxt review: A healthy mix of privacy, security, and freedom
|
||||
|
||||
![][5]
|
||||
|
||||
Internxt is based out of Spain. Like several other EU-based companies, encryption and privacy are at its core.
|
||||
|
||||
It is a **[zero-knowledge encrypted][6] cloud storage service**. This means that no one except you can access your data. Your data is encrypted before it gets uploaded, and it is decrypted with your password. The server doesn’t have access to the keys that could be used to decrypt your data.
|
||||
|
||||
This also means that you must not lose your password with Internxt. _**If you lose the password, you lose your data completely.**_
|
||||
|
||||
There is more to Intenxt’s offering on privacy and security, though.
|
||||
|
||||
With a focus on **Web3**, it uses a **decentralized approach**. Files uploaded to Internxt Drive are fragmented, encrypted on the client-side, and distributed all over the globe. A single server never holds a complete file but just an encrypted data shard.
|
||||
|
||||
The icing on the cake is that **Internxt is open source**. You can check the source code for various components on their GitHub repository.
|
||||
|
||||
[Internxt on GitHub][4]
|
||||
|
||||
How cool is that! Let me share my experience with Internxt for the past couple of weeks.
|
||||
|
||||
### The Internxt Drive experience on Linux
|
||||
|
||||
Internxt’s primary offering is Drive, cloud storage for all kinds of files. They also have a product called Photos to securely store the photos and videos from your smartphone to the Internxt drive.
|
||||
|
||||
My focus here is on Internxt Drive. **It’s a new product, and hence several features will be added in the near future.**
|
||||
|
||||
#### Installation and setup
|
||||
|
||||
For Linux users, there are AppImage and DEB files. You can get the DEB package on their [official website][3] as well, and you can find various installer files on its GitHub repository.
|
||||
|
||||
[Download Internxt Drive for Linux][7]
|
||||
|
||||
Installing the DEB file is easy. After installation, when you start it for the first time, it shows a few screens to help you get acquainted with the Drive.
|
||||
|
||||
(_click to expand the images_)
|
||||
|
||||
![][8]
|
||||
|
||||
![][9]
|
||||
|
||||
![][10]
|
||||
|
||||
On the first run, it creates a new folder named Internxt in your home directory. Any files you put here get synchronized to the cloud, and you can access them on any device via a web browser. Similarly, any files you keep on the drive get added to the Internxt folder on your local disk.
|
||||
|
||||
Internxt adds an applet indicator to the top panel for quickly accessing the settings and preferences. It works with Ubuntu, but I am not sure how it would work with elementary OS and distros with vanilla GNOME because they prohibit applet indicators.
|
||||
|
||||
![][11]
|
||||
|
||||
That’s the default behavior. You can change the sync folder to any other folder of your choice. I went with the default options.
|
||||
|
||||
Now, here’s the thing. Sync doesn’t start immediately and automatically, so I had to hit the sync button manually. You can drag and drop files to the Internxt folder, but to sync it to the cloud, you have to go to the Internxt applet indicator, press the Show/Hide button, and then hit the Play button.
|
||||
|
||||
![Sync progress][12]
|
||||
|
||||
But this is by design, apparently. It was mentioned in the set-up screens. It probably does the sync automatically after a certain interval, but surely, it doesn’t happen immediately.
|
||||
|
||||
This was a surprise for me. But I was told by the Internxt team that _**real-time sync would be coming in the next version release along with selective sync.**_
|
||||
|
||||
Yes, Internxt misses the ability to choose which folders from the web drive you want to sync to your local drive for now. This should be added in the upcoming versions.
|
||||
|
||||
#### Sync and backup
|
||||
|
||||
Internxt provides two ways to store your files: sync and backup.
|
||||
|
||||
The backup gives you the ability to let you sync any folder on your computer to the cloud. Any changes you make in this folder(s) should be reflected on the cloud.
|
||||
|
||||
In this case, you don’t have to copy and paste the files in the Internxt folder to save them to the cloud.
|
||||
|
||||
The backup is not real-time at present. You can select the update frequency from its settings.
|
||||
|
||||
![Backup feature of Internxt][13]
|
||||
|
||||
I don’t think the backup feature supports versioning. It could be a good feature to add in the future version, though.
|
||||
|
||||
#### Updating Internxt
|
||||
|
||||
Thankfully, a new Internxt version was released soon after I installed it. I got the notification when I tried accessing the Internxt settings.
|
||||
|
||||
![Internxt notifies if there is a new version available][14]
|
||||
|
||||
The ‘Download update’ option had me confused a bit because it downloaded the DEB file for the latest version. Installing the DEB file required the removal of the existing Internxt install.
|
||||
|
||||
I wasn’t certain whether going with that will also remove the Internxt folder, but I proceeded and thankfully, everything remained in place.
|
||||
|
||||
#### Experience with Internxt Drive on the web
|
||||
|
||||
The web interface of Internxt is clean and simple, and it looks modern when compared to the web interface of pCloud.
|
||||
|
||||
![Internxt Drive on the web][15]
|
||||
|
||||
There are limitations to what you can do on the web interface. When writing this review, it’s not possible to read text files or Markdown files. I didn’t feel the need to check the doc files because that wouldn’t work for sure.
|
||||
|
||||
However, you can read PDF documents, which is surprising.
|
||||
|
||||
It displays the images if you click on them but not their thumbnails. This feature will be added in future versions.
|
||||
|
||||
And no, it cannot play videos at the moment.
|
||||
|
||||
You can share individual files with others but not folders, and I found it a bit weird.
|
||||
|
||||
![You can share files with others using Internxt Drive on web][16]
|
||||
|
||||
Overall, the web experience is satisfactory for file storage, but it needs some improvement on the file viewing part.
|
||||
|
||||
I didn’t test Internxt on mobile devices, though.
|
||||
|
||||
### Is Internxt worth using?
|
||||
|
||||
Internxt is pretty new and under heavy development, and new features are coming in future releases.
|
||||
|
||||
With the added features, it can be a promising alternative to popular options.
|
||||
|
||||
Internxt is open-source software, and you can find all the source code. You don’t have to worry about hosting it yourself, though. You can start using Internxt right away by signing up with them. With zero-knowledge encryption, your files should stay secure and private.
|
||||
|
||||
Internxt offers 2 GB of free cloud storage when you sign up. The free storage can be stretched up to 10 GB by ‘completing challenges’ like downloading its mobile app.
|
||||
|
||||
[Get up to 10 GB free cloud storage with Internxt][3]
|
||||
|
||||
However, you should opt for their paid plan if you can afford it. You get access to more cloud storage space, and the pricing for the individuals is as low as €12 per year for 20 GB.
|
||||
|
||||
![Internxt pricing for the lifetime plan \(which will be removed soon\)][17]
|
||||
|
||||
But if you go with my suggestion and if it is affordable for you, **you should go for their lifetime plan**. With that, you get 1 TB of cloud storage for a single payment of €99 (plus taxes).
|
||||
|
||||
They have a **30-day money-back guarantee, so you can get your entire amount back if you don’t like it**. What else can you ask for?
|
||||
|
||||
[Internxt Pricing][18]
|
||||
|
||||
Do note that **Internxt will stop selling its lifetime plan by the end of this month**. If you get it before the end of February, you’ll get the cloud storage for a single payment. If you are considering it, decide before the month ends.
|
||||
|
||||
The money-back-guarantee should have your back if you don’t like it.
|
||||
|
||||
[Internxt - Open Source, Encrypted Cloud Storage][3]
|
||||
|
||||
Encrypted by default, the EU-based Internxt is a promising cloud storage service provider. It is a good alternative to the likes of Mega and pCloud.
|
||||
|
||||
![Internxt - Open Source, Encrypted Cloud Storage][19]
|
||||
|
||||
![Internxt - Open Source, Encrypted Cloud Storage][19]
|
||||
|
||||
[Check it out][3]
|
||||
|
||||
We earn a commission if you make a purchase, at no additional cost to you.
|
||||
|
||||
**Internxt is also working to include Photos (for photo backup), Mail (for encrypted emails) and Send (for large file transfer) in its offering.** All this makes Internxt a value for money investment.
|
||||
|
||||
Internxt is one of the rare open-source projects that ticks so many boxes. It is an open-source yet easy-to-use commercial product. Like every other offering, it’s not perfect and has room for improvement.
|
||||
|
||||
Currently, I use [pCloud][20] for dumping all kinds of data because I have their 2 TB lifetime plan. Now, I will use the 2 TB of Internxt storage for storing photos and videos from my phone. I have a nine months old kid, and I am always running out of space because I keep on taking too many photos and videos! :)
|
||||
|
||||
_If you decide to use Internxt or have already been using it, share your experience in the comment section. Do you find it worth recommending to others?_
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/internxt-cloud-service/
|
||||
|
||||
作者:[Abhishek Prakash][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://itsfoss.com/author/abhishek/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://itsfoss.com/cloud-services-linux/
|
||||
[2]: https://linuxhandbook.com/install-nextcloud-docker/
|
||||
[3]: https://itsfoss.com/go/internxt/
|
||||
[4]: https://github.com/internxt
|
||||
[5]: https://itsfoss.com/wp-content/uploads/2022/02/Internxt-cloud-service.png
|
||||
[6]: https://help.internxt.com/en/articles/5387164-what-is-zero-knowledge-encryption
|
||||
[7]: https://github.com/internxt/drive-desktop/releases/
|
||||
[8]: https://itsfoss.com/wp-content/uploads/2022/02/internxt-drive-setup-screens.png
|
||||
[9]: https://itsfoss.com/wp-content/uploads/2022/02/internxt-drive-setup-screens-1.png
|
||||
[10]: https://itsfoss.com/wp-content/uploads/2022/02/internxt-drive-setup-screens-2.png
|
||||
[11]: https://itsfoss.com/wp-content/uploads/2022/02/internxt-default-setup.png
|
||||
[12]: https://itsfoss.com/wp-content/uploads/2022/02/sync-progress-internxt.png
|
||||
[13]: https://itsfoss.com/wp-content/uploads/2022/02/backup-feature-internxt-drive.png
|
||||
[14]: https://itsfoss.com/wp-content/uploads/2022/02/internxt-update.png
|
||||
[15]: https://itsfoss.com/wp-content/uploads/2022/02/Internxt-web-drive-800x467.png
|
||||
[16]: https://itsfoss.com/wp-content/uploads/2022/02/sharing-files-with-internxt-800x449.png
|
||||
[17]: https://itsfoss.com/wp-content/uploads/2022/02/internxt-pricing-800x454.png
|
||||
[18]: https://itsfoss.com/go/internxt-pricing/
|
||||
[19]: https://itsfoss.com/wp-content/uploads/2022/02/Internxt_400x400.jpg
|
||||
[20]: https://itsfoss.com/recommends/pcloud/
|
@ -0,0 +1,94 @@
|
||||
[#]: subject: "Scan documents and old photos on Linux with Skanlite"
|
||||
[#]: via: "https://opensource.com/article/22/2/scan-documents-skanlite-linux-kde"
|
||||
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Scan documents and old photos on Linux with Skanlite
|
||||
======
|
||||
Use this Linux KDE application to digitize your archives.
|
||||
![Filing papers and documents][1]
|
||||
|
||||
Although the world has mostly gone digital now, there are still times when you just have to print a form, sign it, and scan it back in. Sometimes, I find that a snapshot on my phone suffices, but some industries require a better copy than a hasty snapshot, and so a flatbed scanner is necessary. The KDE project provides an application called Skanlite that helps you import documents scanned on a flatbed, or even a tethered camera.
|
||||
|
||||
### Install Skanlite on Linux
|
||||
|
||||
You can install Skanlite from your software repository. On Fedora, Mageia, and similar:
|
||||
|
||||
|
||||
```
|
||||
`$ sudo dnf install skanlite`
|
||||
```
|
||||
|
||||
On Elementary, Linux Mint, and other Debian-based distributions:
|
||||
|
||||
|
||||
```
|
||||
`$ sudo apt install skanlite`
|
||||
```
|
||||
|
||||
### Scanner drivers
|
||||
|
||||
Most scanners on the market are compatible with the SANE scanner API. SANE isn't really a driver, but a protocol that can receive input from image capture devices and provide options to a programmer looking to build an application around it. Skanlite is one such application.
|
||||
|
||||
I've yet to come across a scanner that doesn't interface with SANE, but there are probably scanners out there that don't. In those cases, look on the manufacturer's website for SANE or TWAIN drivers, or else for their proprietary driver and scanner interface. The latter may not be usable with Skanlite, but Skanlite is always worth launching when you're unsure whether your scanner communicates over standard protocols. I've even had printer and scanner combination devices where the scanner is recognized immediately, even though the printer requires an additional driver.
|
||||
|
||||
### Using Skanlite
|
||||
|
||||
When you launch Skanlite, it first searches your system for image capture devices. On laptops, Skanlite usually discovers the webcam as a valid input source (because it is), but it also locates flatbed scanners attached to your machine. Select the scanner you want to use, and then continue.
|
||||
|
||||
To see what's on the scanbed, click the **Preview** button in the bottom right corner of the application.
|
||||
|
||||
![Skanlite with custom artwork][2]
|
||||
|
||||
(Image courtesy KDE)
|
||||
|
||||
This displays a preview image in the right panel. Nothing has been saved to your drive, this only shows you what your scanner has on it at the moment.
|
||||
|
||||
### Selecting a scan area
|
||||
|
||||
If you only need a portion of what's on the scanner, you can select an area you want to save. To select a single region, click and drag your mouse over the area you want to save. When there's an active selection, only the portion of the document you've selected will be saved when you click the **Scan** button.
|
||||
|
||||
You can have more than one selection, which is especially efficient when you need to scan several small images or only specific parts of one larger documents. To add a selection, click the **+** icon that appears in the center of your selection.
|
||||
|
||||
![Adding selections][3]
|
||||
|
||||
(Image courtesy KDE)
|
||||
|
||||
You can remove selections by clicking the **-** icon, which appears when you have multiple active selections.
|
||||
|
||||
### Scan settings
|
||||
|
||||
Image capture settings are located in the left panel. These controls allow you to import images in color or grayscale, and make adjustments to the brightness and contrast of the image. These options are software-based and don't affect how your scanner behaves, but they're common adjustments to make, and doing those adjustments here can save you from having to post-process the image in GIMP or Gwenview.
|
||||
|
||||
In many cases, your scanner may have configurable settings, found in the **Scanner Specific Options** tab on the left of the Skanlite window. Some scanners allow you to adjust color temperature, brightness, saturation, and other attributes that happen in firmware. Available options vary depending on the device and vendor, so you're likely to see changes in this panel depending on which device you're interfacing with.
|
||||
|
||||
### Scan and save
|
||||
|
||||
When you're ready to import the image (or the selected area of the image, if you've made selections), click the **Scan** button in the bottom right corner of the Skanlite window. Depending on your device, it may take a few moments to create the scan, but when it's done you're prompted to save or discard the image. If you like what you see, click **Save**.
|
||||
|
||||
Images are saved to whatever default location you have configured. To see the default location, click the **Settings** button in the bottom right corner of the window. In **Skanlite Settings**, you can set the default save location, the default name format, and the image resolution. You can also control whether you're prompted to save or discard an image after each scan, or whether you prefer to save everything and sort through it later.
|
||||
|
||||
### Scanning is easy on Linux
|
||||
|
||||
Scanning documents on Linux is so easy, I rarely give it a second thought. There aren't usually special drivers or applications you need to hunt down and install, because applications like Skanlite use open protocols to make the process simple. The next time you have a hard copy that you need to digitize, import it with Skanlite.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/2/scan-documents-skanlite-linux-kde
|
||||
|
||||
作者:[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/documents_papers_file_storage_work.png?itok=YlXpAqAJ (Filing papers and documents)
|
||||
[2]: https://opensource.com/sites/default/files/skanlite.png (Skanlite with custom artwork)
|
||||
[3]: https://opensource.com/sites/default/files/skanlite-selection.jpg (Adding selections)
|
@ -0,0 +1,151 @@
|
||||
[#]: subject: "How to Configure Task Switcher in KDE Plasma Desktop"
|
||||
[#]: via: "https://www.debugpoint.com/2022/02/configure-task-switcher-kde/"
|
||||
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
How to Configure Task Switcher in KDE Plasma Desktop
|
||||
======
|
||||
This guide explains how to configure the Task Switcher in the KDE Plasma
|
||||
desktop.
|
||||
This guide explains how to configure the Task Switcher in the KDE Plasma desktop.
|
||||
|
||||
![Configure KDE Plasma Task Switcher][1]
|
||||
|
||||
### What is Task Switcher?
|
||||
|
||||
A [task switcher][2] is a component that helps you to switch between open windows or applications in your current desktop session. Usually, the feature shows up as a list of icons when you press `Alt+Tab`.
|
||||
|
||||
![Thumbnail Grid Task Switcher][3]
|
||||
|
||||
And this is highly configurable as per your exact needs in KDE Plasma. You can customise its looks, the sort order of the icons, grouping of same applications and more.
|
||||
|
||||
### Changing Task Switcher in KDE Plasma
|
||||
|
||||
Open `System Settings`. Under `Workspace` group, click on `Window Management > Task Switcher`.
|
||||
|
||||
On the Main tab, the Visualisation section has a below drop-down. This drop-down contains several Task Switcher options which you can try.
|
||||
|
||||
Select your favourite option and hit the preview button. If you are satisfied, then you can click on Apply.
|
||||
|
||||
![Configure Task Switcher in KDE][4]
|
||||
|
||||
This is how you can change the task switcher in the KDE Plasma desktop.
|
||||
|
||||
### The Alternative Switcher
|
||||
|
||||
The Alternative tab also contains the same visualisation options for the task switcher. However, you can set a different key combination other than Alt+Tab for the Alternatives configuration set. This way, you can simultaneously experience two different groups of task switchers with different combinations.
|
||||
|
||||
### Visualisations
|
||||
|
||||
As of writing this guide [until [KDE Plasma 5.24][5]], the following options are available for different task switchers.
|
||||
|
||||
* Breeze
|
||||
* Breeze Dark
|
||||
* Breeze Twilight
|
||||
* Compact
|
||||
* Fedora
|
||||
* Grid
|
||||
* Informative
|
||||
* large Icons
|
||||
* Small Icons
|
||||
* Text Only
|
||||
* Thumbnail Grid
|
||||
* Thumbnails
|
||||
|
||||
|
||||
|
||||
And here are the screenshots of the above task switchers.
|
||||
|
||||
![Various Task Switcher][6]
|
||||
|
||||
![][7]
|
||||
|
||||
![][8]
|
||||
|
||||
![][9]
|
||||
|
||||
![][10]
|
||||
|
||||
![][11]
|
||||
|
||||
![][12]
|
||||
|
||||
![][13]
|
||||
|
||||
![][14]
|
||||
|
||||
Now, that is the basic configuration of the Task Switcher in the KDE Plasma desktop. Now I am going to explain how it behaves in the below scenarios.
|
||||
|
||||
### Task Switcher in Multiple Monitor or Display
|
||||
|
||||
If you have a multiple monitor or display setup, you do not need to do anything. The Task witcher will show up based on where your mouse cursor is. That means it will show up in the active display.
|
||||
|
||||
[][15]
|
||||
|
||||
SEE ALSO: MX Linux Launches First-Ever KDE Edition with Plasma Desktop
|
||||
|
||||
### Task Switcher with Same Application Grouping
|
||||
|
||||
You can also group the same application icons in the task switcher to keep it simple and crisp. For example, if you have multiple Dolphin file manager instances open, you can select the below option to appear Dolphin icon only once in the task switcher visualisation.
|
||||
|
||||
![Same application grouping][16]
|
||||
|
||||
But you might be wondering how to navigate through the same application instances if it appears only once. You can navigate the same applications via `Alt+`` (default value) in the task switcher. Here are the options you can change as per your need and work.
|
||||
|
||||
### Download more task switchers
|
||||
|
||||
If you are not satisfied with all the above options, you can download additional task switchers from KDE Store via the same settings window.
|
||||
|
||||
Click on the Get New Task Switchers [annotation#5 in above image] and select your favourite one. And click Install. After complete installation, come back to the main settings window and apply the newly downloaded visualisation.
|
||||
|
||||
Remember, these additional items are user-contributed and may break your current theme in some cases. So use with caution. At any time, you can hit the Reset button to come back to the stock Task Switcher visualisation.
|
||||
|
||||
### Closing Notes
|
||||
|
||||
I hope this guide helps you set up a beautiful but productive task switcher in the KDE Plasma desktop. As I said, the customisation options are plenty, and you can play around with them.
|
||||
|
||||
Cheers.
|
||||
|
||||
* * *
|
||||
|
||||
We bring the latest tech, software news and stuff that matters. Stay in touch via [Telegram][17], [Twitter][18], [YouTube][19], and [Facebook][20] and never miss an update!
|
||||
|
||||
##### Also Read
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.debugpoint.com/2022/02/configure-task-switcher-kde/
|
||||
|
||||
作者:[Arindam][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.debugpoint.com/author/admin1/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.debugpoint.com/wp-content/uploads/2022/02/kdetaskw1-1024x576.jpg
|
||||
[2]: https://docs.kde.org/trunk5/en/kwin/kcontrol/kwintabbox/index.html
|
||||
[3]: https://www.debugpoint.com/wp-content/uploads/2022/02/Thumbnail-Grid-1024x177.jpg
|
||||
[4]: https://www.debugpoint.com/wp-content/uploads/2022/02/Configure-Task-Switcher-in-KDE-1024x652.jpg
|
||||
[5]: https://www.debugpoint.com/2022/01/kde-plasma-5-24/
|
||||
[6]: https://www.debugpoint.com/wp-content/uploads/2022/02/Thumbnails-150x150.jpg
|
||||
[7]: https://www.debugpoint.com/wp-content/uploads/2022/02/Thumbnail-Grid-150x150.jpg
|
||||
[8]: https://www.debugpoint.com/wp-content/uploads/2022/02/Text-Only-150x150.jpg
|
||||
[9]: https://www.debugpoint.com/wp-content/uploads/2022/02/Small-Icons-150x108.jpg
|
||||
[10]: https://www.debugpoint.com/wp-content/uploads/2022/02/Large-Icons-150x150.jpg
|
||||
[11]: https://www.debugpoint.com/wp-content/uploads/2022/02/Informative-150x150.jpg
|
||||
[12]: https://www.debugpoint.com/wp-content/uploads/2022/02/Grid-Task-Switcher-150x150.jpg
|
||||
[13]: https://www.debugpoint.com/wp-content/uploads/2022/02/Compact-Task-Switcher-150x150.jpg
|
||||
[14]: https://www.debugpoint.com/wp-content/uploads/2022/02/Breeze-Task-Switcher-150x150.jpg
|
||||
[15]: https://www.debugpoint.com/2020/08/mx-linux-kde-edition-19-2/
|
||||
[16]: https://www.debugpoint.com/wp-content/uploads/2022/02/Same-application-grouping.jpg
|
||||
[17]: https://t.me/debugpoint
|
||||
[18]: https://twitter.com/DebugPoint
|
||||
[19]: https://www.youtube.com/c/debugpoint?sub_confirmation=1
|
||||
[20]: https://facebook.com/DebugPoint
|
@ -0,0 +1,79 @@
|
||||
[#]: subject: "My favorite casual games to play on Linux"
|
||||
[#]: via: "https://opensource.com/article/22/2/casual-gaming-linux-kde"
|
||||
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
My favorite casual games to play on Linux
|
||||
======
|
||||
Play a video game on Linux while your open source code compiles.
|
||||
![Gaming with penguin pawns][1]
|
||||
|
||||
I love a good game that you can immerse yourself in for hours, but I don't always have the luxury of ignoring daily tasks to disappear into a video game. Still, I do love a fun challenge from time to time, and two of my favourite applications to launch when my computer gets busy doing something that I need to wait on are games from the KDE Games package: **KBlocks** and **Kolf**.
|
||||
|
||||
### KBlocks
|
||||
|
||||
My favorite video game involves blocks falling from the sky, and ideally landing in rows which magically disappear when blocks are contiguous. KBlocks is one implementation of that format, and it's a good one. It's got responsive block rotation with **Left** and **Right Arrow**, adjustable faster fall with the **Down Arrow**, instant fall with **Spacebar**, There are a few different levels of difficulty to control how quickly blocks fall.
|
||||
|
||||
![KBlocks][2]
|
||||
|
||||
(Seth Kenlon, [CC BY-SA 4.0][3])
|
||||
|
||||
The default theme of KBlocks is ancient Egyptian, which has no bearing on gameplay but can be pleasant for Egyptophiles. You can change the theme, though, in the **Configure KBlocks** menu item. An alternate theme called **Plasma** is included, or you can click on **Get New Themes** button and download user-contributor themes.
|
||||
|
||||
![KBlocks Invaders by José Jorge][4]
|
||||
|
||||
(Seth Kenlon, CC BY-SA 4.0)
|
||||
|
||||
The theme is purely aesthetic, but for the artistic type, creating a theme for a casual game could be a fun way to contribute to an open source project.
|
||||
|
||||
#### A gateway game to the KDE Plasma Desktop
|
||||
|
||||
I'll admit, KBlocks is difficult for me to put down. In fact, it was my desire to play games during meetings that led me to find the `M-x tetris` command in Emacs, which in turn caused me to discover, and fall in love with, Linux in the first place. There's great power in this game. Maybe KBlocks will be the way you discover the KDE Plasma Desktop?
|
||||
|
||||
### Kolf
|
||||
|
||||
I don't like golf in real life, but on the computer miniature golf is a pleasantly frustrating mix of simulated physics and fun level design. With Kolf, the goal is as you'd expect: hit a golf ball into a hole. The destination is, of course, always around a corner, over a hill, past a pond, or behind a wall, so it's your goal to calculate ball speed, friction, incline, and trajectory with such perfection that you get the ball home in as few hits as possible.
|
||||
|
||||
![Miniature golf][5]
|
||||
|
||||
(Seth Kenlon, [CC BY-SA 4.0][3])
|
||||
|
||||
It's never as easy as it looks, and I don't think it ever gets old to watch the golf ball bounce off of objects and roll down hills that you never intended for it to go near.
|
||||
|
||||
#### Designing your own course
|
||||
|
||||
The fun really begins when you try your hand at designing your own miniature golf course. Yes, Kolf has a level editor, in which you can build walls, place ponds and hills and sandtraps, add pinball-style bumbers, and more.
|
||||
|
||||
![Kolf editor][6]
|
||||
|
||||
(Seth Kenlon, [CC BY-SA 4.0][3])
|
||||
|
||||
Because Kolf can be a multi-player game, it's especially fun to give each player five minutes to design a level, and then see who does best at whose level.
|
||||
|
||||
### Linux KDE games
|
||||
|
||||
These aren't by any means the only two games from the KDE project. There are many others, including card games, tile games, and arcade games. The nice thing about the KDE Games package is that they contain games you're happy to walk away from at a moment's notice, and they only require about a fourth of your attention. I use these to kill time while compiling code. Sometimes I don't get a full game in, but I always appreciate the subtle shift in mental gears.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/2/casual-gaming-linux-kde
|
||||
|
||||
作者:[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/gaming_grid_penguin.png?itok=7Fv83mHR (Gaming with penguin pawns)
|
||||
[2]: https://opensource.com/sites/default/files/kblocks.jpg (KBlocks)
|
||||
[3]: https://creativecommons.org/licenses/by-sa/4.0/
|
||||
[4]: https://opensource.com/sites/default/files/kblocks-invaders.jpg (KBlocks Invaders by José Jorge)
|
||||
[5]: https://opensource.com/sites/default/files/kolf.jpg (Miniature golf)
|
||||
[6]: https://opensource.com/sites/default/files/kolf-edit.jpg (Kolf editor)
|
@ -0,0 +1,101 @@
|
||||
[#]: subject: "Math is fun with this Linux graphing calculator"
|
||||
[#]: via: "https://opensource.com/article/22/2/kalgebra-linux-calculator"
|
||||
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Math is fun with this Linux graphing calculator
|
||||
======
|
||||
Like your favorite graphing calculator from high school, KAlgebra is
|
||||
both a scientific calculator and a 2D plotter plus more features.
|
||||
![sin\(00.4x^2\) + .002y^2][1]
|
||||
|
||||
If you spent your high school years gazing at TI-80 series calculators but lost track of the device somewhere along the way, then you might sometimes yearn to relive those thrilling years of algebra and calculus. Somebody on the Linux KDE project must have felt that way, too, because one of the KDE Framework libraries, Analitza, provides syntax and widgets to enable you to perform advanced math functions with K apps like the graphing calculator KAlgebra.
|
||||
|
||||
### Install KAlgebra on Linux
|
||||
|
||||
On Linux, you can install KAlgebra from your software repository. For example, on Fedora, Mageia, and similar:
|
||||
|
||||
|
||||
```
|
||||
`$ sudo dnf install kalgebra`
|
||||
```
|
||||
|
||||
On Elementary, Linux Mint, and other Debian-based distributions:
|
||||
|
||||
|
||||
```
|
||||
`$ sudo apt install kalgebra`
|
||||
```
|
||||
|
||||
Alternately, you can [install it as a flatpak][2].
|
||||
|
||||
### Linux calculator
|
||||
|
||||
KAlgebra is, like many of the famous graphing calculators used in schools, both a scientific calculator and a 2D plotter. Unlike any of the graphing calculators I've ever used, it's also a 3D plotter. But before rushing into 3D space, start with some basic syntax.
|
||||
|
||||
When representing an equation in KAlgebra, you must do some minor translation of math symbols as they're often written by hand to how they're represented on a computer. For instance, to convert Fahrenheit degrees to Celsius, the equation is: (5÷9) × (n-32), where _n_ is Fahrenheit. This is generally how equations and mathematical functions are expressed: they use special symbols like ÷ and × as well as variables like n, and then they identify what variable represents what kind of value. You may or may not know the meaning of every special math symbol, but as long as you know that a special symbol has a specific meaning, then you can look it up. In the temperature conversion example, the symbols are pretty common, so you probably already know that ÷ represents division and × represents multiplication.
|
||||
|
||||
In KAlgebra, as in most programming languages, division is represented by a forward slash and multiplication by an asterisk, so the equation to, for example, convert 70° Fahrenheit is `(5/9)*(70-32)`.
|
||||
|
||||
There are also special functions for common math operations in KAlgebra, and when you type any letter into KAlgebra, a tooltip provides potential auto-completion for available functions. Another way to write the equation for temperature conversion in KAlgerbra is to use the _times_ function: `times(5/9, 70-32)`.
|
||||
|
||||
As you complete math problems, established variables are listed in the right column of the calculator, including the `ans` value, which is updated with the answer to the completed equation. In theory, then, you should be able to reverse the conversion and derive a Fahrenheit temperature from _ans_.
|
||||
|
||||
![Temperature conversion in KAlgebra][3]
|
||||
|
||||
(Seth Kenlon, [CC BY-SA 4.0][4])
|
||||
|
||||
### Graphing calculator
|
||||
|
||||
Numbers are fun, but they really get fun when they're used to draw shapes. The visualization of 2D space on a graph is an important skill to develop for all kinds of disciplines, not the least of which is computer programming.
|
||||
|
||||
To draw a line on a graph, you must set a horizontal value (the x-axis) or a vertical value (the y-axis) or both. A valid equation for a straight line in common mathematical notation is just `x=5`. This produces a straight horizontal line 5 points above the 0 origin point of the graph. However, in KAlgebra you must make it explicit that you want to set just the x value with the notation `x->5`.
|
||||
|
||||
![A line in KAlgebra][5]
|
||||
|
||||
(Seth Kenlon, [CC BY-SA 4.0][4])
|
||||
|
||||
Other than that, graphing is as straightforward as it is elsewhere. You can write complex equations, and you can use special functions, like `sin`.
|
||||
|
||||
![Sin wave and an s-curve][6]
|
||||
|
||||
(Seth Kenlon, [CC BY-SA 4.0][4])
|
||||
|
||||
### 3D graph on Linux
|
||||
|
||||
By the time you get to the 3D graph tab, you likely have a good understanding of the syntax of KAlgebra, and you've also exceeded my mathematical knowledge. I learned everything I know about cartesian graphs from electronics and synthesis, so the most fun I've had with the 3D graph is visualizing a sine wave as a 3D object:
|
||||
|
||||
![Sine waves in space][7]
|
||||
|
||||
(Seth Kenlon, [CC BY-SA 4.0][4])
|
||||
|
||||
The difference between the 3D graph and the 2D graph (aside from 1 dimension) is that you can only have one plot in the 3D graph, so choose your equations wisely.
|
||||
|
||||
### Can math be fun?
|
||||
|
||||
It turns out that yes, math can be fun, and the answer is a good graphing calculator. As I've been working my way through math lessons to make up for some pretty dismal math grades in my past, I find myself wishing that calculators had been encouraged. I'm finding KAlgebra to be a very useful tool for not only solving arbitrary problems, but also for understanding the syntax of equations, and the purpose of functions. Whatever your relationship with mathematics, take out your KAlgebra calculator and run some numbers. It's actually really fun.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/2/kalgebra-linux-calculator
|
||||
|
||||
作者:[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/kalgebra-header.jpg?itok=BVm5kMq2 (sin(00.4x^2) + .002y^2)
|
||||
[2]: https://opensource.com/article/21/11/install-flatpak-linux
|
||||
[3]: https://opensource.com/sites/default/files/kalgebra-temperature_0.jpg (Temperature conversion in KAlgebra)
|
||||
[4]: https://creativecommons.org/licenses/by-sa/4.0/
|
||||
[5]: https://opensource.com/sites/default/files/kalgebra-line-x.jpg (A line in KAlgebra)
|
||||
[6]: https://opensource.com/sites/default/files/kalgebra-sin.jpg (Sin wave and an s-curve)
|
||||
[7]: https://opensource.com/sites/default/files/kalgebra-sin-3d.jpg (Sine waves in space)
|
@ -0,0 +1,92 @@
|
||||
[#]: subject: "Put sticky notes on your Linux KDE desktop"
|
||||
[#]: via: "https://opensource.com/article/22/2/sticky-notes-linux-kde"
|
||||
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Put sticky notes on your Linux KDE desktop
|
||||
======
|
||||
Use KNotes, a feature of the Kontact suite, to gently remind yourself of
|
||||
your daily tasks.
|
||||
![Working from home at a laptop][1]
|
||||
|
||||
I remember the first time I went to an "un" conference. It was a chaotic event at first, with lots of socializing and sharing of personal projects, but it gradually coalesced into a mostly self-organized technical event. It didn't happen with magic, but with sticky notes. People wrote ideas for talks and presentations on those colorful adhesive notepads, and stuck them to a common wall, and other people grouped similar ideas into clusters, and eventually everyone knew where to congregate to discuss specific topics. It was a beautiful and satisfying thing to witness, and it gave me a new respect for sticky notes. So I was happy to recently discover that the KDE Plasma Desktop has digital sticky notes, and in many ways they're even more useful than the physical ones. The application is called KNotes, and if you have random ideas that you feel like jotting down, it's probably something you want to consider for your own Linux desktop.
|
||||
|
||||
### Install KNotes
|
||||
|
||||
KNotes is part of the Kontact suite, which is the personal information manager (PIM) for KDE. If you're running the Plasma Desktop, then you probably already have KNotes installed. If not, you can install it from your package manager:
|
||||
|
||||
|
||||
```
|
||||
`$ sudo dnf install kontact`
|
||||
```
|
||||
|
||||
On a Debian-based distribution, use the `apt` command instead of `dnf`.
|
||||
|
||||
### KNotes on the Linux desktop
|
||||
|
||||
Even though KNotes is part of Kontact, it's also a stand-alone application that can run in the background, ready to produce a blank note whenever you need one. Launch KNotes from your application menu, and it minimizes itself to your system tray. Its icon is a small yellow square, because before sticky notes got colorful in real life they tended to all be yellow.
|
||||
|
||||
To create a new note, right-click the KNote icon in your system tray and select **New Note**. The first time you create a note, you're prompted to choose a destination for the saved note. Select the local KNotes database file (it's managed by Kontact, so you won't interact with that file directly) and enable the selection to use this location by default. From then on, you won't be prompted again.
|
||||
|
||||
A new note appears on your desktop, and you can type yourself a note.
|
||||
|
||||
![Start using KNotes][2]
|
||||
|
||||
(Seth Kenlon, [CC BY-SA 4.0][3])
|
||||
|
||||
It's as simple as that. Or at least, it would be, were these old-fashioned physical notes. But these are digital KDE KNotes, so you can do a lot more than just jot down some reminder text to yourself.
|
||||
|
||||
### Changing note colors
|
||||
|
||||
A bunch of yellow notes start to blend together, but you can color-code notes. Right-click on the title bar of the note (the part with the date and time) and select **Preferences** from the contextual menu that appears. In the **Preferences** window, you can change the title and body font and font size, and then select the **Display Settings** tab to change the note and font colors.
|
||||
|
||||
![KNotes with added color][4]
|
||||
|
||||
(Seth Kenlon, [CC BY-SA 4.0][3])
|
||||
|
||||
### Sending notes
|
||||
|
||||
When I used to write myself notes, I often jotted reminders to myself in the scratch buffer of [Emacs][5]. There are better ways to manage [notes in Emacs][6], but my habit of jotting notes down in places that I was destined to be absent-mindedly close later, without saving, was difficult to break.
|
||||
|
||||
With KNotes, the notes are automatically saved to Kontact, so you don't have to worry about keeping track of them. Better still, they're digital, so you can send them to yourself on other devices. You can email notes to yourself, or you can send them to another computer over your network. All it takes is a right-click on the title bar of a note, and you can select **Email** or **Send**.
|
||||
|
||||
To receive notes as KNotes from one KDE Plasma Desktop to another, you must give KNotes permission on the recipient machine to accept notes. To allow incoming notes, right-click on the KNotes icon in the system tray and select **Configure KNotes**.
|
||||
|
||||
![Configure KNotes][7]
|
||||
|
||||
(Seth Kenlon, [CC BY-SA 4.0][3])
|
||||
|
||||
### Setting alarms
|
||||
|
||||
At least for me, notes usually happen because I've promised someone something in the short term, often by the end of the day. Notes stuck to my desktop do tend to get covered up as I work and open more and more windows, so it's especially helpful that KNotes allow you to set alarms for the really important ones.
|
||||
|
||||
To set an alarm for a note, right-click on the note's title bar and select **Set alarm**.
|
||||
|
||||
### Take notes on Linux
|
||||
|
||||
Sticky notes are easy and fun ways to keep track of daily tasks. They don't "work" for everyone, and they aren't my only means of tracking things I mean to do each day, but they're great options to have, and there's nothing more satisfying than moving a completed note into the "done" pile before deleting them all at the end of the day. Give it a try, it's a habit that just might stick.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/2/sticky-notes-linux-kde
|
||||
|
||||
作者:[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/wfh_work_home_laptop_work.png?itok=VFwToeMy (Working from home at a laptop)
|
||||
[2]: https://opensource.com/sites/default/files/knote-yellow.jpg (Start using KNotes)
|
||||
[3]: https://creativecommons.org/licenses/by-sa/4.0/
|
||||
[4]: https://opensource.com/sites/default/files/knote-color.jpg (KNotes with added color)
|
||||
[5]: https://opensource.com/downloads/emacs-cheat-sheet
|
||||
[6]: https://opensource.com/article/18/7/emacs-modes-note-taking
|
||||
[7]: https://opensource.com/sites/default/files/knotes-preferences.jpg (Configure KNotes)
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user