Merge remote-tracking branch 'LCTT/master'

This commit is contained in:
Xingyu Wang 2020-04-10 17:04:12 +08:00
commit ca27ebd0ce
12 changed files with 1079 additions and 593 deletions

View File

@ -0,0 +1,182 @@
[#]: collector: (lujun9972)
[#]: translator: (messon007)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-12093-1.html)
[#]: subject: (The Keyring Concept in Ubuntu: What is It and How to Use it?)
[#]: via: (https://itsfoss.com/ubuntu-keyring/)
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
解读 Ubuntu 里的密钥环概念
======
![][3]
如果你用过 Ubuntu 或者其他的 Linux 发行版里的[自动登录功能][1], 你可能遇到过这种弹出消息:
> 请输入密码以解锁你的登录密钥环
>
> 登录密钥环在你登录系统时未解锁。
![Enter Password To Unlock Your Login Keyring Ubuntu][2]
如果你一直点击取消,它会不断弹出几次才会消失。你可能想知道,为什么你会一直看到这个密钥环信息呢?
让我来告诉你吧。它其实不是错误,而是一个安全特性。
奇怪吗?下面就让我来解释下 Linux 里的密钥环概念。
### Linux 里的密钥环是什么。为什么需要它?
在现实生活中你为什么要用钥匙环(也叫[钥匙链][4])?你用它把一把或多把钥匙串到一起, 以便于携带和查找。
Linux 里也是类似的。密钥环特性使你的系统可以将各种密码放在一起,并将其保存在一个地方。
大多数 Linux 桌面环境,如 GNOME、KDE、Xfce 等采用 [GNOME 密钥环][5]来提供这个功能。
该密钥环保存了 ssh 密钥、GPG 密钥以及使用此功能的应用程序(例如 Chromium 浏览器)的密钥。默认情况下,**“密钥环”通过主密码来保护**,该密码通常是帐户的登录密码。
系统上的每个用户都有自己的密钥环,(通常)密码与用户帐户本身的密码相同。当你使用密码登录系统时,你的密匙环将使用你帐户的密码自动解锁。
当你[启用 Ubuntu 中的自动登录功能时][1]时,就有问题了。这意味着你无需输入密码即可登录系统。在这种情况下,你的密钥环不会自动解锁。
#### 密钥环是一个安全特性
记得我说过密钥环是一个安全特性吗?现在想象一下你在 Linux 电脑上开启了自动登录功能。有权访问你电脑的任何人无需密码就能进入你的系统。但是你可能不会在意,因为你只是用它来访问互联网。
但是,如果你在 Ubuntu 中使用 Chromium 或 [Google Chrome][6] 之类的浏览器,并使用它来保存各种网站的登录密码,那么你将遇到麻烦。任何人都可以使用浏览器并利用你在浏览器中保存的密码登录网站。这不很危险吗?
这就是为什么当你使用 Chrome 时,它将反复地提示你先解锁密钥环。这确保了只有知道密钥环密码(即账户密码)的人才能使用在浏览器中保存的密码来登录它们相关的网站。
如果你反复取消解锁密钥环的提示,它最终将消失,并允许你使用浏览器。但是,保存的密码将不会被解锁,你在 Chromium/Chome 浏览器上将会看到“同步暂停”的提示。
![Sync paused in Google Chrome][7]
#### 如果密钥环一直存在,为什么你从来没有见过它呢?
如果你在你的 Linux 系统上从没见过它的话,这个问题就很有道理。
如果你从没有用过自动登录功能(或者修改你的账户密码),你可能都没有意识到这个特性的存在。
这是因为当你通过你的密码登录系统时,你的密钥环被你的账户密码自动解锁了。
Ubuntu和其他发行版在执行普通的管理任务如修改用户、安装新软件等需要输入密码无论你是否是自动登录的。但是对于日常任务像使用浏览器它不需要输入密码因为密钥环已经被解锁了。
当你切换到自动登录时,你不再需要输入登录密码。这意味着密钥环没有被自动解锁,因此当你使用利用了密钥环特性的浏览器时,它将提示你来解锁密钥环。
#### 你可以轻松地管理密钥环和密码
这个密钥环放在哪里?它的核心是一个守护任务(一个后台自动运行的程序)。
别担心。你不必通过终端来操作守护任务。大多数桌面环境都自带一个可以和这个守护进程进行交互的图形化应用程序。KDE 上有 KDE 钱包GNOME 和其他桌面上叫做“密码和密钥”(之前叫 [Seahorse][8])。
![Password And Keys App in Ubuntu][9]
你可以用这个 GUI 程序来查看哪些应用程序在用密钥环来管理/保护密码。
你可以看到,我的系统有自动创建的登录密钥环。也有一个存储 GPG 和 SSH 密钥的密钥环。那个[证书][10]用来保存证书机构颁发的证书(如 HTTPS 证书)。
![Password and Keys application in Ubuntu][11]
你也可以使用这个应用程序来手动保存网站的密码。例如我创建了一个新的叫做“Test”的被密码保护的密钥环并手动存储了一个密码。
这比在一个文本文件中保存一批密码要好一些。至少在这种情况下,你的密码只有在你通过密码解锁了密钥环时才允许被看到。
![Saving New Password Seahorse][12]
这里有一个潜在的问题,如果你格式化你的系统,手动保存的密码必然会丢失。通常,你会备份你的个人文件,但并不是所有的用户特定数据,如密钥环文件。
有一种办法能解决它。密钥环数据通常保存在 `~/.local/share/keyrings` 目录。在这里你可以看到所有的密钥环,但是你不能直接看到它们的内容。如果你移除密钥环的密码(我会在这篇文章的后面描述操作步骤),你可以像一个普通的文本文件一样读取密钥环的内容。你可以将这个解锁后的密钥环文件完整地复制下来,并在其他的 Linux 机器上运行“密码和密钥”应用程序导入到其中。
总结一下目前为止所学的内容:
* 大多数 Linux 系统缺省已经安装并激活了密钥环特性
* 系统上的每个用户都拥有他自己的密钥环
* 密钥环通常是用账户密码锁定的(保护)
* 当你通过密码登录时密钥环会被自动解锁
* 对于自动登录,密钥环不会自动解锁,因此当你试图使用依赖密钥环的应用程序时会被提示先解锁它
* 并不是所有的浏览器或应用程序利用了密钥环特性
* Linux 上)安装一个 GUI 程序可以和密钥环交互
* 你可以用密钥环来手动存储加密格式的密码
* 你可以自己修改密钥环密码
* 你可以通过导出(需要先解锁密钥环)并导入到其他计算机上的方式来获取手工保存的密码。
### 修改密钥环密码
假设你修改了你的账户密码。当你登录时,你的系统试图通过新的登录密码来自动解锁密钥环。但是密钥环还在使用老的登录密码。
这种情况下,你可以修改密钥环密码为新的登录密码,这样密码环才能在你登录系统时自动解锁。
从菜单中打开“密码和密钥”应用程序:
![Look for Password and Keys app in the menu][9]
在“Login”密钥环上右击并点击“修改密码”
![Change Keyring Password][13]
#### 如果你不记得老的登录密码怎么办?
你可能知道在 [Ubuntu 上重置忘记的密码很容易][14]。但是密钥环在这种场景下还是有问题。你修改了账户密码,但是你不记得仍然被密钥环使用的老的账户密码。
你不能修改它因为你不知道老的密码。怎么办?
这种情况下,你将不得不移除整个密钥环。你可以通过“密码和密钥”应用程序来操作:
![Delete Keyring Ubuntu][15]
它会提示你进行确认:
![Delete Keyring][16]
另外,你也可以手动删除 `~/.local/share/keyrings` 目录下的密钥环文件。
老的密钥环文件被移除后,你再打开 Chrome/Chromium 时,它会提示你创建一个新的密钥环。
![New Keyring Password][17]
你可以用新的登录密码,密钥环就会被自动解锁了。
### 禁用密钥环密码
在你想用自动登录但又不想手动解锁密钥环时,你可以把禁用密钥环密码作为一个规避方法。记住你正在禁用一个安全特性,因此请三思。
操作步骤和修改密钥环相似。打开“密码和密钥”应用程序,然后修改密钥环密码。
技巧在于当它提示修改密码时,不要输入新密码,而是点击“继续”按钮。这将移除密钥环的密码。
![Disable Keyring password by not setting any password at all][18]
这种方法,密钥环没有密码保护,并将一直处于解锁状态。
--------------------------------------------------------------------------------
via: https://itsfoss.com/ubuntu-keyring/
作者:[Abhishek Prakash][a]
选题:[lujun9972][b]
译者:[messon007](https://github.com/messon007)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/abhishek/
[b]: https://github.com/lujun9972
[1]: https://itsfoss.com/ubuntu-automatic-logon/
[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/03/enter-password-to-unlock-your-login-keyring-ubuntu.jpg?ssl=1
[3]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/03/keyring-concept-ubuntu-1.png?ssl=1
[4]: https://en.wikipedia.org/wiki/Keychain
[5]: https://wiki.archlinux.org/index.php/GNOME/Keyring
[6]: https://itsfoss.com/install-chrome-ubuntu/
[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/03/sync-paused-keyring-ubuntu.jpg?ssl=1
[8]: https://wiki.debian.org/Seahorse
[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/03/password-and-keys-app-ubuntu.jpg?ssl=1
[10]: https://help.ubuntu.com/lts/serverguide/certificates-and-security.html
[11]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/03/keyring-pasword-ubuntu.png?ssl=1
[12]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/03/saving-new-password-seahorse.png?ssl=1
[13]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/03/change-keyring-password.png?ssl=1
[14]: https://itsfoss.com/how-to-hack-ubuntu-password/
[15]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/03/delete-keyring-ubuntu.jpg?ssl=1
[16]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/03/delete-keyring.jpg?ssl=1
[17]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/03/new-keyring-password.jpg?ssl=1
[18]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/03/disable-keyring-password-ubuntu.png?ssl=1

View File

@ -0,0 +1,161 @@
[#]: collector: (lujun9972)
[#]: translator: (MjSeven)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-12092-1.html)
[#]: subject: (Scheduling tasks on Linux using the at command)
[#]: via: (https://www.networkworld.com/article/3535808/scheduling-tasks-on-linux-using-the-at-command.html)
[#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/)
使用 at 命令在 Linux 上安排任务
======
> at 命令可以很容易地安排 Linux 任务在你选择的任何时间或日期运行,让我们来看看它能为你做什么。
![][0]
当你希望命令或脚本在某个特定时间运行时,你不需要将手指放在键盘上盘旋等待按下回车键,或者是在特定时间坐在办公桌前。相反,你可以通过 `at` 命令来设置任务。在本文中,我们将研究如何使用 `at` 来安排任务,如何精确地选择任务希望运行的时间,以及如何使用 `at` 来查看安排运行的任务。
### at vs cron
对于那些使用 cron 在 Linux 系统上安排任务的人来说,`at` 命令类似于 cron因为你可以在选定的时间调度任务但是 cron 用于定期运行的作业 —— 甚至是每年仅一次。大多数 cron 作业的频率都设置为每天、每周或每月运行一次,不过你可以控制运行的频率和时间。
另一方面,`at` 命令用于仅运行一次的任务。想在午夜重启系统?没问题,只要你有适当的权限,`at` 可以为你完成此操作。如果你希望系统在每个星期六凌晨 2 点重启,那么改用 cron。
### 使用 at
`at` 命令很容易使用,只需记住几件事。一个简单使用 `at` 的例子类似于这样:
```
$ at 5:00PM
at> date >> thisfile
at> <EOT>
```
在输入 `at` 和应该运行命令的时间,`at` 会提示你在设定时间会运行该命令(此例中是 `date` 命令)。输入 `^D``Ctrl + d`)来完成请求。
假设我们在下午 5 点之前设置这个 `at` 命令,那么这个日期和时间将在当天下午 5 点添加到名为 `thisfile` 文件的末尾。否则,该命令将在第二天下午 5 点运行。
`at` 命令进行交互时,可以输入多个命令。如果你要同时运行多个命令,只需输入多个命令行即可:
```
$ at 6:22
warning: commands will be executed using /bin/sh
at> echo first >> thisfile
at> echo second >> thisfile
at> <EOT>
```
在上面的命令中,我们使用了一个普通的用户账户,将一些简单的文本添加到该用户主目录的文件中。如果在上午 6:22 之后运行这些命令,那么命令会在第二天运行,因为 6:22 表示上午 6:22。如果你想在下午 6:22 运行,使用 `6:22 PM` 或者 `18:22`。`6:22 PM` 这样也是可以工作的。
你也可以通过使用 `at` 来安排命令在指定的日期或时间运行,例如 `10:00AM April 15 2021``noon + 5 days`(从今天起 5 天内的中午运行),以下是一些例子:
```
at 6PM tomorrow
at noon April 15 2021
at noon + 5 days
at 9:15 + 1000 days
```
在指定要运行的命令并按下 `^D` 后,你会注意到 `at` 命令为每个请求分配了一个作业编号,这个数字将显示在 `at` 命令的作业队列中。
```
$ at noon + 1000 days
warning: commands will be executed using /bin/sh
at> date >> thisfile
at> <EOT>
job 36 at Tue Dec 27 12:00:00 2022 <== job # is 36
```
### 检查队列
你可以使用 `atq`at queue命令来查看 `at` 作业队列:
```
$ atq
32 Thu Apr 2 03:06:00 2020 a shs
35 Mon Apr 6 12:00:00 2020 a shs
36 Tue Dec 27 12:00:00 2022 a shs
34 Thu Apr 2 18:00:00 2020 a shs
```
如果你需要取消队列中的一个作业,使用 `atrm`at remove命令和作业编号
```
$ atrm 32
$ atq
35 Mon Apr 6 12:00:00 2020 a shs
36 Tue Dec 27 12:00:00 2022 a shs
34 Thu Apr 2 18:00:00 2020 a shs
```
你可以使用 `at -c` 命令来查看安排任务的详细信息,其它详细信息(活动的搜索路径等)也可以看到,但是输出的最后一行将显示计划运行的命令。
```
$ at -c 36 | tail -6
cd /home/shs || {
echo 'Execution directory inaccessible' >&2
exit 1
}
date >> thisfile
```
注意,该命令显示首先会测试是否可以通过 `cd` 命令进入用户目录。如果不可以,作业将退出并显示错误。如果可以,则运行在 `at` 中指定的命令。它将命令视为 “进入 `/home/shs` 或退出并显示错误”。
### 以 root 身份运行作业
要以 root 身份运行 `at` 作业,只需将 `sudo` 与你的 `at` 命令一起使用,如下所示:
```
$ sudo at 8PM
[sudo] password for shs:
warning: commands will be executed using /bin/sh
at> reboot now
at> <EOT>
job 37 at Wed Apr 1 16:00:00 2020
```
注意root 的任务以 `root` 作为执行者显示在队列中。
```
35 Mon Apr 6 12:00:00 2020 a shs
36 Tue Dec 27 12:00:00 2022 a shs
37 Wed Apr 1 20:00:00 2020 a root <==
```
### 运行脚本
你还可以使用 `at` 命令来运行脚本,这里有一个例子:
```
$ at 4:30PM
warning: commands will be executed using /bin/sh
at> bin/tryme
at> <EOT>
```
### 禁止使用 at 命令
`/etc/at.deny` 文件提供了一种禁止用户使用 `at` 命令的方法。默认情况下,它可能会包含一个不允许的账户列表,例如 `ftp``nobody`。可以使用 `/etc/at.allow` 文件执行相反的操作,但是通常只配置 `at.deny` 文件。
### 总结
当你要安排一项一次性任务时,无论你是希望在今天下午或几年后运行,`at` 命令都是通用且易于使用的。
--------------------------------------------------------------------------------
via: https://www.networkworld.com/article/3535808/scheduling-tasks-on-linux-using-the-at-command.html
作者:[Sandra Henry-Stocker][a]
选题:[lujun9972][b]
译者:[MjSeven](https://github.com/MjSeven)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.networkworld.com/author/Sandra-Henry_Stocker/
[b]: https://github.com/lujun9972
[0]: https://images.idgesg.net/images/article/2019/08/gettyimages-140389307-100808283-large.jpg
[1]: https://www.networkworld.com/blog/itaas-and-the-corporate-storage-technology/?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE22140&utm_content=sidebar (ITAAS and Corporate Storage Strategy)
[2]: https://www.facebook.com/NetworkWorld/
[3]: https://www.linkedin.com/company/network-world

View File

@ -1,156 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: (MFGJT)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Best Audio Editors For Linux)
[#]: via: (https://itsfoss.com/best-audio-editors-linux)
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
Best Audio Editors For Linux
======
Youve got a lot of choices when it comes to audio editors for Linux. No matter whether you are a professional music producer or just learning to create awesome music, the audio editors will always come in handy.
Well, for professional-grade usage, a [DAW][1] (Digital Audio Workstation) is always recommended. However, not everyone needs all the functionalities, so you should know about some of the most simple audio editors as well.
In this article, we will talk about a couple of DAWs and basic audio editors which are available as **free and open source** solutions for Linux and (probably) for other operating systems.
### Top Audio Editors for Linux
![Best audio editors and DAW for Linux][2]
We will not be focusing on all the functionalities that DAWs offer but the basic audio editing capabilities. You may still consider this as the list of best DAW for Linux.
**Installation instruction:** You will find all the mentioned audio editors or DAWs in your AppCenter or Software center. In case, you do not find them listed, please head to their official website for more information.
#### 1\. Audacity
![audacity audio editor][3]
Audacity is one of the most basic yet a capable audio editor available for Linux. It is a free and open-source cross-platform tool. A lot of you must be already knowing about it.
It has improved a lot when compared to the time when it started trending. I do recall that I utilized it to “try” making karaokes by removing the voice from an audio file. Well, you can still do it but it depends.
**Features:**
It also supports plug-ins that include VST effects. Of course, you should not expect it to support VST Instruments.
* Live audio recording through a microphone or a mixer
* Export/Import capability supporting multiple formats and multiple files at the same time
* Plugin support: LADSPA, LV2, Nyquist, VST and Audio Unit effect plug-ins
* Easy editing with cut, paste, delete and copy functions.
* Spectogram view mode for analyzing frequencies
#### 2\. LMMS
![][4]
LMMS is a free and open source (cross-platform) digital audio workstation. It includes all the basic audio editing functionalities along with a lot of advanced features.
You can mix sounds, arrange them, or create them using VST instruments. It does support them. Also, it comes baked in with some samples, presets, VST Instruments, and effects to get started. In addition, you also get a spectrum analyzer for some advanced audio editing.
**Features:**
* Note playback via MIDI
* VST Instrument support
* Native multi-sample support
* Built-in compressor, limiter, delay, reverb, distortion and bass enhancer
#### 3\. Ardour
![Ardour audio editor][5]
Ardour is yet another free and open source digital audio workstation. If you have an audio interface, Ardour will support it. Of course, you can add unlimited multichannel tracks. The multichannel tracks can also be routed to different mixer tapes for the ease of editing and recording.
You can also import a video to it and edit the audio to export the whole thing. It comes with a lot of built-in plugins and supports VST plugins as well.
**Features:**
* Non-linear editing
* Vertical window stacking for easy navigation
* Strip silence, push-pull trimming, Rhythm Ferret for transient and note onset-based editing
#### 4\. Cecilia
![cecilia audio editor][6]
Cecilia is not an ordinary audio editor application. It is meant to be used by sound designers or if you are just in the process of becoming one. It is technically an audio signal processing environment. It lets you create ear-bending sound out of them.
You get in-build modules and plugins for sound effects and synthesis. It is tailored for a specific use if that is what you were looking for look no further!
**Features:**
* Modules to achieve more (UltimateGrainer A state-of-the-art granulation processing, RandomAccumulator Variable speed recording accumulator,
UpDistoRes Distortion with upsampling and resonant lowpass filter)
* Automatic Saving of modulations
#### 5\. Mixxx
![Mixxx audio DJ ][7]
If you want to mix and record something while being able to have a virtual DJ tool, [Mixxx][8] would be a perfect tool. You get to know the BPM, key, and utilize the master sync feature to match the tempo and beats of a song. Also, do not forget that it is yet another free and open source application for Linux!
It supports custom DJ equipment as well. So, if you have one or a MIDI you can record your live mixes using this tool.
**Features**
* Broadcast and record DJ Mixes of your song
* Ability to connect your equipment and perform live
* Key detection and BPM detection
#### 6\. Rosegarden
![rosegarden audio editor][9]
Rosegarden is yet another impressive audio editor for Linux which is free and open source. It is neither a fully featured DAW nor a basic audio editing tool. It is a mixture of both with some scaled down functionalities.
I wouldnt recommend this for professionals but if you have a home studio or just want to experiment, this would be one of the best audio editors for Linux to have installed.
**Features:**
* Music notation editing
* Recording, Mixing, and samples
### Wrapping Up
These are some of the best audio editors you could find out there for Linux. No matter whether you need a DAW, a cut-paste editing tool, or a basic mixing/recording audio editor, the above-mentioned tools should help you out.
Did we miss any of your favorite? Let us know about it in the comments below.
--------------------------------------------------------------------------------
via: https://itsfoss.com/best-audio-editors-linux
作者:[Ankush Das][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/ankush/
[b]: https://github.com/lujun9972
[1]: https://en.wikipedia.org/wiki/Digital_audio_workstation
[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/01/linux-audio-editors-800x450.jpeg?resize=800%2C450&ssl=1
[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/01/audacity-audio-editor.jpg?fit=800%2C591&ssl=1
[4]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/01/lmms-daw.jpg?fit=800%2C472&ssl=1
[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/01/ardour-audio-editor.jpg?fit=800%2C639&ssl=1
[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/01/cecilia.jpg?fit=800%2C510&ssl=1
[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/01/mixxx.jpg?fit=800%2C486&ssl=1
[8]: https://itsfoss.com/dj-mixxx-2/
[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/01/rosegarden.jpg?fit=800%2C391&ssl=1
[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/01/linux-audio-editors.jpeg?fit=800%2C450&ssl=1

View File

@ -1,102 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Build a private chat server with a Raspberry Pi and Rocket.Chat)
[#]: via: (https://opensource.com/article/20/3/raspberry-pi-rocketchat)
[#]: author: (Giuseppe Cassibba https://opensource.com/users/peppe8o)
Build a private chat server with a Raspberry Pi and Rocket.Chat
======
Create your own truly private chat and messaging solution with these
simple, cost-effective open source tools.
![Chat via email][1]
The internet offers plenty of free messaging services. Applications like WhatsApp and Viber are part of our daily life and are the most common way we communicate with relatives and friends. But security awareness is increasing the demand for a truly private chat solution. Furthermore, messaging apps take up a lot of space in our devices, so an alternative chat channel could be useful to share media, info, and contacts with our friends.
Today we are going to see how to install a private chat and messaging server with a [Raspberry Pi][2] and Rocket.Chat.
### What is Rocket.Chat?
[Rocket.Chat][3] is an open source solution that provides an enhanced chat service. It includes collaboration tools like media sharing, screen sharing, and video/audio calling support.
It can be used both via browser or from apps available in all the main app stores (Google Play, App Store, etc.).
In addition to the community version, Rocket.Chat also offers Enterprise and Professional versions, including support and additional features.
### What we need
For this project, Im going to use a cheaper Raspberry Pi 3 model A+. RPI 3 models B and B+, and RPI 4 model B should also work in the same way.
I also suggest a performing SD card, because Rocket.Chat can put a heavy workload on our Raspberry Pi. As discussed in other articles, a performing SD card strongly improves Raspbian OS performance.
Well use a lite version of Raspbian with pre-configured WiFi access and SSH service, so ![][4] there will no need for keyboards or HDMI cables.
### Step-by-step procedure
Start by [installing the last version of Raspbian Buster Lite][5].
Well simplify Rocket.Chat installation by using [Snap][6]. Login via SSH and type from the terminal:
```
sudo apt-get update
sudo apt-get upgrade
```
Install Snap:
```
`sudo apt-get install snapd`
```
For Snap installation, we need a system reboot to make it work:
```
`sudo reboot`
```
Login again via SSH and install the Rocket.Chat server with the simple command:
```
`sudo snap install rocketchat-server`
```
After installing from the terminal, please wait a while for Rocket.Chat to initialize its database and services. Have a cup of tea, and after a few minutes you should be able to reach with your browser the address http://&lt;&lt;YOUR_RPI_IP_ADDRESS&gt;&gt;:3000 and you should see the following:
![Rocket Chat setup wizard][7]
Complete the required forms, and everything should go fine. After four simple setup windows, you should reach the Rocket.Chat home page:
![Rocket Chat home page][8]
Enjoy!
_This article originally posted on [peppe8o.com][9], reposted with permission._
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/3/raspberry-pi-rocketchat
作者:[Giuseppe Cassibba][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/peppe8o
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/email_chat_communication_message.png?itok=LKjiLnQu (Chat via email)
[2]: https://opensource.com/resources/raspberry-pi
[3]: https://rocket.chat/
[4]: https://ir-na.amazon-adsystem.com/e/ir?t=peppe8o0b-20&l=am2&o=1&a=B07KKBCXLY
[5]: https://peppe8o.com/2019/07/install-raspbian-buster-lite-in-your-raspberry-pi/
[6]: https://snapcraft.io/
[7]: https://opensource.com/sites/default/files/uploads/rocket-chat-setup-wizard.jpg (Rocket Chat setup wizard)
[8]: https://opensource.com/sites/default/files/uploads/rocket-chat-home.jpg (Rocket Chat home page)
[9]: https://peppe8o.com/private-chat-and-messaging-server-with-raspberry-pi-and-rocket-chat/

View File

@ -0,0 +1,75 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (How to set up a remote school environment for kids with Linux)
[#]: via: (https://opensource.com/article/20/4/school-home-linux)
[#]: author: (Alan Formy-Duval https://opensource.com/users/alanfdoss)
How to set up a remote school environment for kids with Linux
======
Repurpose an old computer to support the new home-schooler in your life.
![Image by Alan Formy-Duvall][1]
COVID-19 has suddenly thrown all of us into a new and challenging situation. Many of us are now working full-time from home, and for a lot of us (especially people who aren't used to working remotely), this is taking some getting used to.
Another group that is similarly challenged is our kids. They can't go to school or participate in their regular after-school activities. My daughter's elementary school closed its classrooms and is teaching through an online, web-based learning portal instead. And one of her favorite extracurricular activities—a coding school where she has been learning Scratch and just recently "graduated" to WoofJShas also gone to an online-only format.
We are fortunate that so many of our children's activities can be done online now, as this is the only way they will be able to learn, share, and socialize for at least the next several months.
### Setting up a temporary homeschool environment
When our daughter's school went to an online-only format, we realized she needed a place and some tools to do her work. So we cleaned off her desk and cleared the toys from the floor around it to make an "office" for her. We also realized she would need a computer. While I could have shopped online and ordered a new computer (and spent at least several hundred dollars—if not more than $1,000—in the process), I chose an alternative and put an old, unused laptop back to work.
If you have an unused computer sitting around and are willing to do a bit of tech work, you, too, can set something up to get your kids online. Here's how I did it.
### The hardware
While my daughter already has her own small IT department (as I like to say), it consists of some gaming systems, a tablet, and a Chromebook. Even her Chromebook has just an 11.6" screen and a small keyboard, so none of her devices are really quite adequate for full-time school duty.
So we found ourselves in a pinch. She really needed a desktop-capable computer system with a decent-sized screen, a full keyboard, a good-quality microphone, a set of speakers, and a headphone jack. And having an external video connector helps if you decide one screen isn't enough.
I didn't have a spare desktop, but I did have a laptop: a Lenovo G550 with a Pentium Dual-Core T4500 2.3GHz processor and 4GB RAM. I replaced its aging 5400RPM spindle hard drive with a 240GB solid-state drive. The laptop has a 15.6" screen, which is much easier to view than the small screens on her other devices, and a comfortable, full-size keyboard. Its CPU scores a bit better in PassMark's benchmarks (913 vs. 674) than the 1.6GHz Intel Celeron N3060 Dual-Core in the Chromebook.
However, it is 10 years old, certainly on the edge of usability by today's standards. But, thanks to the efficiency of the Linux operating system, it gets the job done. I installed the latest version (v31) of [Fedora Workstation][2], but many other distributions will work just fine. If you really want to eke out every drop of performance, you could use one of the [lightweight Linux distributions][3]. The only area that required a little extra effort with Fedora was the wireless; I had to install the driver for the Broadcom WiFi hardware. But really, this was only a few extra steps and a restart, and it was good to go.
Linux supports all of the other hardware in the laptop. My daughter prefers a full-sized mouse over the touchpad, so I attached one. She likes the keyboard on this laptop, but if she wants an external keyboard, there are enough USB ports to hook one up.
It has a traditional 3.5mm audio jack, so she can use headphones. I recommend giving children decibel-limited headphones to protect their hearing.
Even though this laptop has a 15.6" widescreen display, I think having a second monitor gives the best experience. I have a spare that I might hook up to the external VGA connector.
### The software
My daughter's school set up an online learning portal. The benefit is that students just need a supported web browser to log on and get to work, and I thank the school for its efforts and choice of a vendor-agnostic solution. Most Linux distributions include the Mozilla Firefox web browser installed by default, and Linux provides a full operating system, so I can install any applications she might need. Fedora is also updated regularly (unlike the old Windows Vista that came with the laptop and is no longer supported).
![][4]
Scratch running on Fedora
Her extracurricular coding school is using the Zoom client. I'm happy to report that it was an easy [install with RPM][5] and works great on Fedora 31.
### Success!
My daughter has no trouble using her new laptop. She likes the [GNOME desktop][6], particularly the fact that it "Looks like Dad's!" This is turning out to be a great experiment in practical (and under-pressure) use of a Linux desktop.
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/4/school-home-linux
作者:[Alan Formy-Duval][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/alanfdoss
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/homeschool.jpg?itok=vYEd9NON (Image by Alan Formy-Duvall)
[2]: https://getfedora.org/en/workstation/
[3]: https://opensource.com/article/19/6/linux-distros-to-try
[4]: https://opensource.com/sites/default/files/scratch.jpg
[5]: https://zoom.us/download?os=linux
[6]: https://www.gnome.org/

View File

@ -0,0 +1,152 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Print double-sided documents at home with this simple Bash script)
[#]: via: (https://opensource.com/article/20/4/print-duplex-bash-script)
[#]: author: (Jim Hall https://opensource.com/users/jim-hall)
Print double-sided documents at home with this simple Bash script
======
Use this script and save yourself the hassle and wasted paper of trying
to manually load and print double-sided documents.
![bash logo on green background][1]
We have a laser printer at home. This Hewlett Packard LaserJet Pro CP1525nw Color Printer is an older model, but it has been a great workhorse that prints reliably and in color. I [put it on our home network][2] a few years ago using our [Raspberry Pi][3] as a print server.
The LaserJet has been a great addition to my home office. Since [I launched my company][4] last year, I have relied on this little laser printer to print handouts and other materials for client meetings, workshops, and training sessions.
My only gripe with this printer is that it prints single-sided only. If you want to print double-sided, you need to set up a custom print job to do it yourself. That's inconvenient and requires manual steps. In LibreOffice, I need to specifically set up the print job to print the odd-numbered pages first, then reload the paper before printing the even-numbered pages on the other side—but in reverse order.
![LibreOffice print dialog][5]
If I need to print a PDF that someone has sent me, the process is the same. For a four-page document, I first need to print pages 1 and 3, then reload the paper and print pages 2 and 4 in reverse order. In the GNOME print dialog, you need to select "Page Setup" to print odd pages or even pages.
![Gnome print dialog][6]
![Gnome page setup][7]
Regardless of how I print, the overall process is to print the odd-numbered pages, reload the stack of printed pages into the paper tray, then print the even-numbered pages in reverse order. If I'm printing a four-page document, printing the even-numbered pages in reverse order means page 4 prints on the back of page 3 and page 2 prints on the back of page 1. Imagine my frustration in those few instances when I forgot to select the option to print in reverse order when printing the even-numbered pages and ruined a long print job.
Similarly, it's easy to forget how to deal with documents that have an odd number of pages. In a five-page document, you first print pages 1, 3, and 5. But when you reload the printed pages into the printer, you don't want page 5. Instead, you only want to load pages 1 and 3. Otherwise, page 4 will print on the back of page 5, page 2 will print on the back of page 3, and nothing gets printed on the back of page 1.
To make things easier and more reliable, I wrote a simple Bash script that automates printing duplex. This is basically a wrapper to print odd-numbered pages, remind me to reload the pages (and remove the last page if needed), then print the even-numbered pages.
Whenever I need to print a document as duplex, I first convert the document to PDF. This is very easy to do. In LibreOffice, there's a toolbar icon to export directly as PDF. You can also navigate under **File— Export As—Export as PDF** to do the same. Or in any other application, there's usually a **Save to PDF** feature. When in doubt, GNOME supports printing to a PDF file instead of a printer.
![Libre Office toolbar][8]
![Export as PDF][9]
### How it works
Once I've saved to PDF, I let my Bash script do the rest. This really just automates the **lpr** commands to make printing easier. It prints odd pages first, prompts me to reload the paper, then prints the even pages. If the document has an odd number of pages, it also reminds me to remove the last page when I reload the printed pages. It's pretty simple.
The only "programming" part of the script is determining the page count, and figuring out if that's an even or odd number. Both of those are easy to do.
To determine the page count, I use the **pdfinfo** command. This generates useful info about a PDF document. Here's some sample output:
```
$ pdfinfo All\ training\ -\ catalog.pdf
Creator:        Writer
Producer:       LibreOffice 6.3
CreationDate:   Fri Oct 18 16:06:07 2019 CDT
Tagged:         no
UserProperties: no
Suspects:       no
Form:           none
JavaScript:     no
Pages:          11
Encrypted:      no
Page size:      612 x 792 pts (letter)
Page rot:       0
File size:      65623 bytes
Optimized:      no
PDF version:    1.5
```
That output is very easy to parse. To get the page count, I use an AWK one-line script to look for **Pages:** and print the second field.
```
`pages=$( pdfinfo "$1" | awk '/^Pages:/ {print $2}' )`
```
To figure out if this is an odd or even number, I use the modulo (**%**) arithmetic operator to divide by two and tell me the remainder. The modulo of two will always be zero for an even number, and one for an odd number. I use this simple test to determine if the document has an odd number of pages, so I'll need to remove the last page before printing the rest of the document:
```
`if [ $(( $pages % 2 )) -ne 0 ] ; then`
```
With that, writing the **print-duplex.sh** Bash script is a simple matter of calling **lpr** with the correct options to send output to my printer (**lpr -P "HP_LaserJet_CP1525nw"**), to print odd-numbered pages (**-o page-set=odd**) or even-numbered pages (**-o page-set=even**), and to print in reverse order (**-o outputorder=reverse**).
### Bash script
```
#!/bin/sh
# print-duplex.sh
# simple wrapper to print duplex
cat&lt;&lt;EOF
$1 ($pages pages)
\-------------------------------------------------------------------------------
Printing odd pages first
Please wait for job to finish printing...
\-------------------------------------------------------------------------------
EOF
lpr -P "HP_LaserJet_CP1525nw" -o page-set=odd "$1"
sleep $pages
cat&lt;&lt;EOF
===============================================================================
Put paper back into the printer in EXACT OUTPUT ORDER (face down in tray)
then press ENTER
===============================================================================
EOF
pages=$( pdfinfo "$1" | awk '/^Pages:/ {print $2}' )
if [ $(( $pages % 2 )) -ne 0 ] ; then
  echo '!! Remove the last page - this document has an odd number of pages'
fi
echo -n '&gt;'
read x
cat&lt;&lt;EOF
\-------------------------------------------------------------------------------
Printing even pages
Please wait for job to finish printing...
\-------------------------------------------------------------------------------
EOF
lpr -P "HP_LaserJet_CP1525nw" -o page-set=even -o outputorder=reverse "$1"
```
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/4/print-duplex-bash-script
作者:[Jim Hall][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/jim-hall
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/bash_command_line.png?itok=k4z94W2U (bash logo on green background)
[2]: https://opensource.com/article/18/3/print-server-raspberry-pi
[3]: https://opensource.com/resources/raspberry-pi
[4]: https://opensource.com/article/19/9/business-creators-open-source-tools
[5]: https://opensource.com/sites/default/files/uploads/print_dialog_-_libreoffice_0.png (LibreOffice print dialog)
[6]: https://opensource.com/sites/default/files/uploads/print_dialog_-_gnome_0.png (Gnome print dialog)
[7]: https://opensource.com/sites/default/files/uploads/print_dialog_-_gnome_-_page_setup.png (Gnome page setup)
[8]: https://opensource.com/sites/default/files/uploads/toolbar_-_export_as_pdf_-_libreoffice.png (Libre Office toolbar)
[9]: https://opensource.com/sites/default/files/uploads/file_-_export_as_pdf_-_libreoffice.png (Export as PDF)

View File

@ -0,0 +1,142 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Use Emacs Org mode to easily create LaTeX documents)
[#]: via: (https://opensource.com/article/20/4/emacs-org-mode)
[#]: author: (Peter Prevos https://opensource.com/users/danderzei)
Use Emacs Org mode to easily create LaTeX documents
======
You can use LaTeX for scientific and technical documents without all of
the confusing commands and syntax you would normally need.
![Filing cabinet for organization][1]
LaTeX is a powerful system, especially for writing scientific and technical documents. But writing documents in LaTeX can be confusing because you need to know a lot of commands, and your text is littered with backslashes, curly braces, and other syntax distractions. But being productive as a writer requires that you focus on the text's content instead of how it looks. Fortunately, the [GNU Emacs][2] Org mode extension makes it easy to write plain-text documents and seamlessly export them to LaTeX and PDF.
[Org mode][3] is a built-in Emacs extension that helps you keep notes, maintain to-do lists, manage projects, and author documents with a fast and effective plain-text system. Emacs also comes with [AUCTeX][4], an extensible package for writing TeX files in Emacs. AUCTeX has a preview module that shows the results of what you type, but I find it distracting because it draws my attention away from the document's content to its design. Writing text in Org mode is my preferred option because the source remains a plain-text file with minimal typesetting elements. The text is independent of its result because Org mode can export it to multiple formats, including LaTeX and PDF.
Emacs is known for being difficult to use with a steep learning curve. But Emacs is only difficult when you want to fine-tune the default settings. By following a minimalist approach to using the vanilla GNU Emacs, this article will get you quickly and easily on your way to writing beautiful documents without any complex configuration.
### First steps
Before you begin, [install Emacs][5] and a fully functioning version of [LaTeX][6] on your computer.
Next, you need to learn some conventions. In Emacs lingo, the abbreviation **C-c** means to enter **Ctrl+C** on your keyboard. The abbreviation **M-x** means **Alt+X**. The M stands for the mod key, which no longer exists in modern systems. The **S** prefix indicates the **Shift** key.
The **find-file** function, which you start with the **C-x C-f** keystroke combination, creates a new document or opens an existing document. Entering this function opens a dialog in the mini-buffer at the bottom of the screen, which is where Emacs communicates with the user. Type the name of the file you want to create or open into the mini-buffer. Emacs is sensitive to file extensions, so make sure that the name of your document ends in **.org**.
In Emacs speak, opening or creating a file is called ["visiting" a file][7]. Visiting a file means reading its contents into an Emacs buffer so that it is available for editing. Emacs generates a new buffer for each file you visit.
### Writing prose with Org mode
Once you're visiting a file, you can start typing your text the same way you would in any text editor or word processor. Some conventions: Begin the file with **#+TITLE:** to denote the title of the document and **#+AUTHOR** for your name. These options are used when exporting the file. Org mode recognizes a range of [export settings][8] to configure the output. For example, to suppress the table of contents, enter **#+OPTIONS: toc:nil**.
Org mode has its own Markdown-like conventions to format your document. [Headlines][9] start with one or more asterisks. Org mode can [collapse a headline][10] to render parts of it invisible with the **TAB** or **S-TAB** keys. You can make words ***bold***, **/italic/**, **_underlined_**, or **=verbatim=**. The Org manual describes the many options for [rich text][11].
One minor issue with plain-vanilla Emacs that you will quickly notice is it does not wrap lines at the end of the visible screen. Emacs has several line-wrapping functions, and [Visual Line mode][12] is the most useful for writing long-form text. To activate this mode, use **M-x** and enter **visual-line-mode** in the mini-buffer at the bottom of the screen. The **M-x** keyboard shortcut enables executing functions for which there is no direct keyboard shortcut.
Adding [images][13] is as easy as adding a link to the image file within double square brackets:
```
`[[file:path_to_image.png]]`
```
Org has a great system for [formatting tables][14] in plain ASCII. Any line with **|** is considered part of a table. The vertical line is also the column separator. A line starting with **|-** is rendered as a horizontal rule, and rows before the first horizontal rule are header lines. A table might look like this in the source file:
```
| Name  |   id | Age |
|-------+------+-----|
| Peter | 1234 |  50 |
| Sue   | 4321 |  54 |
```
Both images and tables are preceded with **#+CAPTION:** to add a [caption][15]. Advanced options are also available to control float placement and size of figures.
Emacs has extensive [editing functions][16] to make you more efficient when typing text. Spell checking, thesaurus, auto-completion, and an undo tree are just some of the tools that help you write efficiently.
### Adding LaTeX snippets to Org
In addition to the text itself, Org mode-text can include simple LaTeX commands, such as **\newpage**, within the text. Equations in standard LaTeX syntax are placed between dollar signs **$e^{i\pi} + 1 = 0$**. The **org-latex-preview** function (**C-c C-x C-l**) shows a [preview][17] of any LaTeX equations within the text buffer. Last, you can also add complete LaTeX snippets to insert complex content. The code has to be placed in an export block:
```
#+BEGIN_EXPORT latex
\setlength{\unitlength}{1cm}
\thicklines
\begin{picture}(10,6)
\put(2,2.2){\line(1,0){6}}
\put(2,2.2){\circle{2}}
\put(6,2.2){\oval(4,2)[r]}
\end{picture}
#+END_EXPORT
```
### Exporting to LaTeX
Org mode includes a powerful export module to convert your files to many formats using the powerful [Pandoc][18] software. Start the export module with the **org-export-dispatch** function, which you can run with the **C-c C-e** keyboard shortcut. The dispatch will split your screen and provide a range of options.
First, Pandoc converts the Org mode file to a LaTeX file. Then you can choose to open the LaTeX file in a new buffer or save it as a file. Org mode can also directly render a PDF file, which you can view within Emacs or save to disk.
![Emacs with Org mode source and PDF preview][19]
### Advanced use
This article provides a first taste of writing prose in Org mode and LaTeX. Org mode has numerous configuration options to fine-tune your document or to change default settings.
By default, Org mode uses the article style to export documents, but you can change this with export settings. These settings can also be used to add commands to the document header, for example:
```
#+LATEX_CLASS: report
#+LATEX_CLASS_OPTIONS: [a4paper]
#+LATEX_HEADER: \usepackage{times}
```
If you write scientific documents, the [org-ref][20] package by John Kitchin provides Org-mode modules for citations, cross-references, and bibliographies in Org mode and useful BibTeX tools to go with it.
The Org mode manual's [LaTex export][21] section provides a detailed discussion of the functionality available.
### Conclusion
Org mode is a perfect editor for writing LaTeX. The main advantage is that you lose the clutter of LaTeX syntax and can focus on the text. This comes at no cost because you can still add LaTeX code as much as you need, and you get access to the powerful editing functions in Emacs.
Using Org to write books and articles allows you to focus on the text as you combine two of the oldest and most powerful pieces of open source software.
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/4/emacs-org-mode
作者:[Peter Prevos][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/danderzei
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/files_documents_organize_letter.png?itok=GTtiiabr (Filing cabinet for organization)
[2]: https://opensource.com/article/20/3/getting-started-emacs
[3]: https://orgmode.org
[4]: https://www.gnu.org/software/auctex/
[5]: https://www.gnu.org/software/emacs/
[6]: https://www.latex-project.org/get/
[7]: https://www.gnu.org/software/emacs/manual/html_node/emacs/Visiting.html
[8]: https://orgmode.org/manual/Export-Settings.html
[9]: https://orgmode.org/manual/Headlines.html#Headlines
[10]: https://orgmode.org/manual/Global-and-local-cycling.html#Global-and-local-cycling
[11]: https://orgmode.org/manual/Markup-for-Rich-Contents.html#Markup-for-Rich-Contents
[12]: https://www.gnu.org/software/emacs/manual/html_node/emacs/Visual-Line-Mode.html
[13]: https://orgmode.org/manual/Images.html
[14]: https://orgmode.org/manual/Built_002din-Table-Editor.html#Built_002din-Table-Editor
[15]: https://orgmode.org/manual/Captions.html#Captions
[16]: https://www.gnu.org/software/emacs/manual/html_node/emacs/Basic.html#Basic
[17]: https://orgmode.org/manual/Previewing-LaTeX-fragments.html
[18]: https://pandoc.org/
[19]: https://opensource.com/sites/default/files/uploads/org-mode-latex-screenshot.png (Emacs with Org mode source and PDF preview.)
[20]: https://github.com/jkitchin/org-ref
[21]: https://orgmode.org/manual/LaTeX-Export.html#LaTeX-Export

View File

@ -0,0 +1,111 @@
[#]: collector: (lujun9972)
[#]: translator: (HankChow)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (How to Go Full Dark Mode in Ubuntu 20.04)
[#]: via: (https://itsfoss.com/dark-mode-ubuntu/)
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
How to Go Full Dark Mode in Ubuntu 20.04
======
One of the most talked about [new features in Ubuntu 20.04][1] is the dark mode. You can [install dark theme in any Ubuntu version][2] to give it a dark look but the new Ubuntu 20.04 makes it a lot easier.
You dont need to install themes on your own. You can find three variants of the default theme (called Yaru) and you can enable the dark mode from the settings.
It still leaves a few thing to I am going to show you some tips on giving complete dark mode to your Ubuntu system.
### Enable dark mode in Ubuntu 20.04
[Subscribe to our YouTube channel for more Linux videos][3]
The steps are performed on the GNOME desktop. If you are [using some other desktop environment][4], the screenshots may look different.
Press the super key (Windows key) and start typing settings to search for the Settings application.
![Search for Settings][5]
In the Settings application, go to Apperance section and you should see three variants of the theme: Light, Standard and Dark. No prizes for guessing that you need to select Dark if you want to use the dark mode.
![Enable Dark Theme in Ubuntu][6]
Not all but applications using GTK3 should automatically comply with the dark theme. In other words, youll notice that most of the applications like text editor, terminal, LibreOffice etc on your system automatically switch to dark mode.
But it still leaves a few thing in the light mode. Let me show you a couple of tips to go to the darker side.
### Tweaks to go full dark mode in Ubuntu 20.04
Youll notice that the shell theme is still light. The message tray, system tray (in the top panel) are still not using dark mode.
![No Dark Shell by default in Ubuntu][7]
Youll have to [use a GNOME extension][8] here that will let you install Yaru dark shell theme. Install the browser extension first by using this command in terminal ([use Ctrl+Alt+T keyboard shortcut for terminal in Ubuntu][9]).
```
sudo apt install chrome-gnome-shell
```
Now [go to the extensions webpage][10] and enable the extension by switching it on:
![Enable User Themes GNOME Extension][11]
You need to [install GNOME Tweaks tool][12] by using this command:
```
sudo apt install gnome-tweaks
```
Open the GNOME Tweaks tool and go to Appearance. Youll see the option to change the shell theme. You dont need to install this Yaru dark shell theme. Its already there. You just have to enable it.
![Enable Yaru Dark Shell Theme in Ubuntu][13]
Now, you can see that even the shell features like desktop notifications, message tray, system tray are also in dark mode.
![Yaru Dark Shell Theme in Ubuntu][14]
Looks better, isnt it? There is one more thing you could do to further enjoy dark mode in Ubuntu. Youll notice that the websites you visit still have white background. You cannot expect all the websites to provide a dark mode.
This is where you can use a browser extension like [Dark Reader][15]. John has already discussed it in the tutorial on [enabling dark mode in Firefox][16]. Its not a complicated task. If you use Firefox, Chrome or [Chromium in Ubuntu][17], you can install the browser extension listed on the [Dark Reader website][15].
Once you have installed Dark Reader, all the websites you visit should be in dark mode automatically.
![Its FOSS Homepage in Dark Mode with Dark Reader][18]
You may still find a few external third party applications using light theme. You may have to manually enable dark theme, if they have such an option available.
Dark mode is getting popular these days even among the non-coders. With these tips, you can satisfy your craving of dark mode in Ubuntu.
I hope you like it. Enjoy the dark mode.
--------------------------------------------------------------------------------
via: https://itsfoss.com/dark-mode-ubuntu/
作者:[Abhishek Prakash][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/abhishek/
[b]: https://github.com/lujun9972
[1]: https://itsfoss.com/ubuntu-20-04-release-features/
[2]: https://itsfoss.com/install-themes-ubuntu/
[3]: https://www.youtube.com/c/itsfoss?sub_confirmation=1
[4]: https://itsfoss.com/find-desktop-environment/
[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/settings-search-ubuntu-20-04.jpg?ssl=1
[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/enable-dark-theme-ubuntu.png?ssl=1
[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/no-dark-shell-ubuntu.jpg?ssl=1
[8]: https://itsfoss.com/gnome-shell-extensions/
[9]: https://itsfoss.com/ubuntu-shortcuts/
[10]: https://extensions.gnome.org/extension/19/user-themes/
[11]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/enable-user-themes-gnome.jpg?ssl=1
[12]: https://itsfoss.com/gnome-tweak-tool/
[13]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu-yaru-dark-shell-theme.jpeg?ssl=1
[14]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/yaru-dark-shell-theme-ubuntu.jpg?ssl=1
[15]: https://darkreader.org/
[16]: https://itsfoss.com/firefox-dark-mode/
[17]: https://itsfoss.com/install-chromium-ubuntu/
[18]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/01/itsfoss_dark_mode.jpg?ssl=1

View File

@ -0,0 +1,156 @@
[#]: collector: (lujun9972)
[#]: translator: (MFGJT)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Best Audio Editors For Linux)
[#]: via: (https://itsfoss.com/best-audio-editors-linux)
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
Linux 上最好的音频编辑工具
======
在 Linux 上,有很多种音频编辑器可供你选用。不论你是一个专业的音乐制作人,还是只想学学怎么做出超棒的音乐的爱好者,这些强大的音频编辑器都是很有用的工具。
对于专业级的使用,我总是建议使用 [DAW][1](数码音频工作站)。但并不是所有人都需要全部的功能,所以你也应该了解一些最简单的音频编辑器。
在本文中,我们将讨论几个 DAW 和基础的音频编辑器,而且它们都是在 Linux 和(很有可能)其它操作系统上可以使用的**免费并开源**的音频编辑方案。
### Linux 上的最佳音频编辑器
![Best audio editors and DAW for Linux][2]
我们不会关注 DAW 提供的所有功能,而只是关注基本的音频编辑功能。不过,你仍然可以把以下内容看作是 Linux 的最佳 DAW 名单。
**安装说明:**
你可以在 AppCenter 或 Software center 中找到所有提到的音频编辑器或daw。如果你在这两个地方没有找到它们请前往它们的官方网站获取更多信息。
#### 1\. Audacity
![Audacity audio editor][3]
Audacity 是 Linux 中最基本音频编辑器之一,但是它也很强大。它是一个免费的开源跨平台工具。肯定已经有很多人了解这个软件了。
现在的它相比它最初流行的时候有了很大的改进。我记得我以前试着通过从音频中去除人声来制作卡拉OK伴奏。现在有些时候你仍然可以这么做。
**特性:**
它还支持包含 VST 效果的插件。当然,你不应该期望它支持 VST 设备。
* 通过麦克风或混音器进行现场录制
* 支持同时从多种音频格式的文件中批量导出/导入内容
* 支持 LADSPA,LV2,Nyquist,VST 和 Audio Unit 的效果插件
* 使用简单,带有剪切、粘贴、删除和拷贝的功能
* 可观测声音频率的频谱模式
#### 2\. LMMS
![LMMS audio editor][4]
LMMS 是一个免费的开源(跨平台)数码音频工作站。它包括所有基本的音频编辑功能以及许多高级功能。
你可以混音,组合音频,或使用 VST 设备创造音频。 LMMS 支持这些功能。此外它还自带一些样本音频预设VST 设备和特效来帮助你起步。创建音频。此外,你还可以得到一个频谱分析仪,以便进行高级的音频编辑工作。
**特性:**
* 基于 MIDI 的音符回放
* 支持 VST 设备
* 支持多样本
* 内置压缩器,限制器,延迟功能,混响功能,失真功能和低音增强器
#### 3\. Ardour
![Ardour audio editor][5]
Ardour 是另一个免费和开源的数码音频工作站。只要你有音频接口Ardour 就支持它的使用。当然,你也可以无限地添加多通道音轨。这些多通道音轨也可以被指派到不同的混音带,以方便编辑和录音。
你也可以导入一个视频,编辑其中的音频,然后导出新的视频和音频。它提供了许多内置插件,并且支持 VST 插件。
**特性:**
* 非线性编辑
* 垂直窗口堆叠,简单的页面导航
* 静默消除功能strip silence推拉修剪功能push-pull trimming和用以短暂片段或基于基于音符开始的编辑的 Rhythm Ferret。
#### 4\. Cecilia
![Cecilia audio editor][6]
Cecilia 不是一个普通的音频编辑器。它的使用者一般是音效设计师或者正在努力成为音效设计师的人。 Cecilia 实际上是一个音频信号处理环境。它可以让你的作品余音绕梁。
你还可以得到内置的音效与合成模组和插件。 Cecilia 为一个明确的目的而生:如果你正在找音效设计工具,这是你的不二之选!
**特性:**
* 利用模块来完成更多工作UltimateGrainer——最先进的颗粒化处理工具RandomAccumulator——记录变量速度的累加器UpDistoRes——通过上采样和谐振低通滤波器创造失真效果的工具
* 自动保存调制设定
#### 5\. Mixxx
![Mixxx audio DJ][7]
如果你想要在混合和录制一些东西的同时能够有一个虚拟的 DJ 工具,[Mixxx][8] 将是完美的工具。你可以用到 BPMkey并使用主同步功能来匹配歌曲的节奏和节拍。另外不要忘记它也是一个 Linux 的免费并开源的软件。
它还支持自定义 DJ 设备。所以,如果你有 DJ 设备或着 MIDI你可以用这个工具录制你的现场混音。
**特性:**
* 播送和录制你的歌曲的 DJ 混音
* 可以连接到你的设备并且现场演奏
* Key 检测和 BPM 检测
#### 6\. Rosegarden
![Rosegarden audio editor][9]
Rosegarden 是另一个令人赞叹的 Linux 的免费并开源的音频编辑器。它既不是一个功能齐全的 DAW也不是一个基本的音频编辑工具。它是两者的混合体并带有一些缩减的功能。
我不会向专业人士推荐这款软件,但如果你经营家庭音乐工作室或只是想体验一下,这将是 Linux 上可以安装的最好的音频编辑器之一。
**特性:**
* 乐谱编辑
* 记录、混合以及样本功能
#### 小结
这些是你可以找到的 Linux 上的最棒的一些音频编辑器了。不论你是需要 DAW一个剪切/粘贴的编辑工具,或者仅仅想要一个拥有基础混音和录音功能的音频编辑工具,上述软件都能够满足你的需求。
如果在这篇文章中我们遗漏了你最喜欢的一些音频工具,可以在原文下方评论中回复告诉我们。
--------------------------------------------------------------------------------
via: https://itsfoss.com/best-audio-editors-linux
作者:[Ankush Das][a]
选题:[lujun9972][b]
译者:[MFGJT](https://github.com/MFGJT)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/ankush/
[b]: https://github.com/lujun9972
[1]: https://en.wikipedia.org/wiki/Digital_audio_workstation
[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/01/linux-audio-editors-800x450.jpeg?resize=800%2C450&ssl=1
[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/01/audacity-audio-editor.jpg?fit=800%2C591&ssl=1
[4]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/01/lmms-daw.jpg?fit=800%2C472&ssl=1
[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/01/ardour-audio-editor.jpg?fit=800%2C639&ssl=1
[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/01/cecilia.jpg?fit=800%2C510&ssl=1
[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/01/mixxx.jpg?fit=800%2C486&ssl=1
[8]: https://itsfoss.com/dj-mixxx-2/
[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/01/rosegarden.jpg?fit=800%2C391&ssl=1
[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/01/linux-audio-editors.jpeg?fit=800%2C450&ssl=1

View File

@ -0,0 +1,100 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Build a private chat server with a Raspberry Pi and Rocket.Chat)
[#]: via: (https://opensource.com/article/20/3/raspberry-pi-rocketchat)
[#]: author: (Giuseppe Cassibba https://opensource.com/users/peppe8o)
使用树莓派和 Rocket.Chat 构建一个私人聊天服务器
======
使用这些简单、经济高效的开源工具创建你自己的真正私人聊天和消息解决方案。
![Chat via email][1]
互联网提供大量免费的消息服务。WhatsApp 和 Viber 等应用是我们日常生活的一部分,也是我们与亲朋好友沟通的最常见方式。但是,安全意识正在增加对真正私人聊天解决方案的需求。此外,消息应用在我们的设备中占用了大量空间,因此备用聊天渠道可用于与朋友共享媒体、信息和联系人。
今天,我们将了解如何使用[树莓派][2]和 Rocket.Chat 安装一个私人聊天和消息服务器。
### 什么是 Rocket.Chat
[Rocket.Chat][3] 是一个开源解决方案,它提供增强的聊天服务。它包括媒体共享、屏幕共享和视频/音频呼叫支持等协作工具。
它可以通过浏览器或从所有主要应用商店Google Play、App Store 等)下载使用。
除了社区版本外Rocket.Chat 还提供企业版和专业版,包括支持和其他功能。
### 我们需要什么
对于这个项目,我将使用更便宜的树莓派 3 model A+。树莓派 3 model B 和 B+ 以及树莓派 4 model B 工作应该一样。
我也建议使用高性能 SD 卡,因为 Rocket.Chat 会给树莓派大量的负载。如其他文章中所述,高性能 SD 卡可显著提高 Raspbian 操作系统的性能。
我们将使用 Raspbian 的精简版本,拥有预配置的 WiFi 访问和 SSH 服务,因此不需要键盘或 HDMI 线缆。
### 分步过程
从[安装最新版本的 Raspbian Buster Lite][5] 开始
我们将使用 [Snap][6] 简化 Rocket.Chat 安装。通过 SSH 登录并从终端输入:
```
sudo apt-get update
sudo apt-get upgrade
```
安装 Snap
```
`sudo apt-get install snapd`
```
安装 Snap 后,我们需要重启系统使其正常工作:
```
`sudo reboot`
```
再次通过 SSH 登录,并用以下简单的命令安装 Rocket.Chat
```
`sudo snap install rocketchat-server`
```
从终端安装后,请等待一段时间,等待 Rocket.Chat 初始化数据库和服务。休息一下,几分钟后,你应该能够在浏览器中访问 http://&lt;&lt;YOUR_RPI_IP_ADDRESS&gt;&gt;:3000你应该看到以下内容
![Rocket Chat setup wizard][7]
填写所需的表格就可以了。四个简单的设置窗口后,你应该会进入 Rocket.Chat 主页:
![Rocket Chat home page][8]
享受吧!
_本文最初发表在 [peppe8o.com][9]并获许重新发布。_
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/3/raspberry-pi-rocketchat
作者:[Giuseppe Cassibba][a]
选题:[lujun9972][b]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/peppe8o
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/email_chat_communication_message.png?itok=LKjiLnQu (Chat via email)
[2]: https://opensource.com/resources/raspberry-pi
[3]: https://rocket.chat/
[5]: https://peppe8o.com/2019/07/install-raspbian-buster-lite-in-your-raspberry-pi/
[6]: https://snapcraft.io/
[7]: https://opensource.com/sites/default/files/uploads/rocket-chat-setup-wizard.jpg (Rocket Chat setup wizard)
[8]: https://opensource.com/sites/default/files/uploads/rocket-chat-home.jpg (Rocket Chat home page)
[9]: https://peppe8o.com/private-chat-and-messaging-server-with-raspberry-pi-and-rocket-chat/

View File

@ -1,182 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: (messon007)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (The Keyring Concept in Ubuntu: What is It and How to Use it?)
[#]: via: (https://itsfoss.com/ubuntu-keyring/)
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
解读Ubuntu里的密钥环概念
======
如果您用过[ubuntu里的自动登录功能][1]或者其他的Linux发行版, 您可能遇到过这种弹出消息:
**请输入密码以解锁您的登录密钥环
登录密钥环在您登录系统时未解锁**
![Enter Password To Unlock Your Login Keyring Ubuntu][2]
你需要点击多次取消才能让它消失。你可能想知道为什么系统会多次反复提示这个密钥环消息?
让我来告诉你答案。它其实并没有出错,它只是一个安全特性。
奇怪吗下面就让我来解释下Linux里的密钥环概念。
### Linux里的密钥环是什么以及为什么需要它?
![][3]
在现实生活中您为什么要用钥匙环(也叫[钥匙链][4])? 您用它把一把或多把钥匙串到一起, 以便于携带和查找。
Linux里也是类似的。密钥环特性使您的系统可以将各种密码放在一起并将其保存在一个地方。
大多数Linux桌面环境像GNOME, KDE, Xfce等采用[gnome的密钥环][5]实现来提供这个功能。
该密钥环保存了ssh密钥GPG密钥以及使用此功能的应用程序例如Chromium浏览器的密钥。 默认情况下,**“密钥环”通过主密码来保护**,该密码通常是帐户的登录密码。
系统上的每个用户都有自己的密钥环,(通常)密码与用户帐户本身的密码相同。 当您使用密码登录系统时,您的密匙环将使用您帐户的密码自动解锁。
当您[启用Ubuntu中的自动登录功能时][1]时,就有问题了。这意味着您无需输入密码即可登录系统。 在这种情况下,您的密钥环不会自动解锁。
#### 密钥环是一个安全特性
记得我说过密钥环是一个安全特性吗现在想象一下您在您的Linux电脑上开启了自动登录功能。有权访问您电脑的任何人无需密码就能进入您的系统。但是您可能不会在意因为您只是用它来访问互联网。
但是如果您使用Chromium或[Ubuntu中的Google Chrome][6]之类的浏览器,并使用它来保存各种网站的登录密码,那么您将遇到麻烦。任何人都可以使用浏览器并利用您在浏览器中保存的密码登录网站。那不就是风险吗?
这就是为什么当您使用Chrome时它将反复地提示您先解锁密钥环。这确保了只有知道密钥环密码的人才能使用在浏览器中保存的密码来登录它们相关的网站。
如果您反复取消解锁密钥环的提示它最终将消失并允许您使用浏览器。但是保存的密码将不会被解锁您在Chromium/Chome浏览器上将会看到'同步暂停'的提示。
![Sync paused in Google Chrome][7]
#### 如果密钥环总是存在的,为什么您从来没有见过它呢?
如果您在您的Linux系统上从没见过它的话这就是一个有效的问题。
如果您从没有用过自动登录功能(或者修改您的账户密码),您可能都没有意识到这个特性的存在。
这是因为当您通过您的密码登录系统时,您的密钥环被您的账户密码自动解锁了。
Ubuntu(和其他发行版)对于通用的管理任务像修改用户, 安装新软件等需要输入密码,无论您是否是自动登录的。但是对于日常任务像使用浏览器,它不需要输入密码因为密钥环已经被解锁了。
当您切换到自动登录时,您不再需要输入登录密码。这意味着密钥环没有被自动解锁,因此当您使用利用了密钥环特性的浏览器时,它将提示您来解锁密钥环。
#### 您可以容易地管理密钥环和密码
这个密钥环放在哪里?它的核心是一个守护任务(一个后台自动运行的程序)。
别担心。您不必通过终端来操作守护任务。大多数桌面环境都自带有图形化的应用程序可以和守护进程进行交互。KDE上有KDE钱包GNOME和其他桌面上叫做密码和密钥(原来叫[海马][8])。
![Password And Keys App in Ubuntu][9]
您可以用这个GUI程序来查看什么应用程序在用密钥环来管理/保护密码。
您可以看到我的系统有自动创建的登录密钥环。也有一个存储GPG和SSH密钥的密钥环。那个[证书][10]是用来保存证书机构颁发的证书(像HTTPS证书)的。
![Password and Keys application in Ubuntu][11]
您也可以使用这个应用程序来手动保存网站的密码。例如,我创建了一个新的叫做'Test'的被密码保护的密钥环,并手动存储了一个密码。
这比保存一批密码在一个文本文件中要好一些。至少在这种情况下,您的密码只有在您通过密码解锁了密钥环时才允许被看到。
![Saving New Password Seahorse][12]
一个潜在的问题是如果您格式化您的系统,手动保存的密码必然会丢失。通常,您会备份您的个人文件,但并不是所有的用户特定数据如密钥环文件。
有一种办法能解决它。密钥环数据通常保存在~/.local/share/keyrings目录。在这里您可以看到所有的密钥环但是您不能直接看到它们的内容。如果您移除密钥环的密码(我会在这篇文章的后面描述操作步骤)您可以像一个普通的文本文件一样读取密钥环的内容。您可以完整地拷贝这个解锁后的密钥环文件并在其他的Linux机器(安装了密码和密钥应用)上导入到密码和密钥应用程序。
总结一下目前为止所学的内容:
* 大多数Linux缺省已经安装并激活了密钥环特性
* 系统上的每个用户都拥有他自己的密钥环
* 密钥环通常被账户密码锁定(保护)
* 当您通过密码登录时密钥环会被自动解锁
* 对于自动登录,密钥环不会自动解锁,因此当您试图使用依赖密钥环的应用程序时会被提示先解锁它
* 并不是所有的浏览器或应用程序利用了密钥环特性
* (Linux上)安装了一个GUI程序可以和密钥环交互
* 您可以用密钥环来手动以加密格式来存储密码
* 您可以自己修改密钥环密码
* 您可以通过导出(需要先解锁密钥环)并导入(到其他计算机上)的方式来获取手工保存的密码。
### 修改密钥环密码
假设您修改了您的账户密码。当您登录时,您的系统试图通过新的登录密码来自动解锁密钥环。但是密钥环还在使用老的登录密码。
这种情况下,您可以修改密钥环密码为新的登录密码,这样密码环才能在您登录系统时自动解锁。
从菜单中打开密码和密钥应用程序:
![Look for Password and Keys app in the menu][9]
在登录密钥环上右击并点击修改密码:
![Change Keyring Password][13]
如果您不记得老的登录密码怎么办?
您可能知道[Ubuntu上复位忘记的密码是很容易的][14]。但是密钥环在这种场景下还是有问题。您修改了账户密码但是您不记得仍然被密钥环使用的老的账户密码。
您不能修改它因为您不知道老的密码。怎么办?
这种情况下,您将不得不移除整个密钥环。您可以通过密码和密钥应用程序来操作:
![Delete Keyring Ubuntu][15]
它会提示您进行确认:
![Delete Keyring][16]
另外,您也可以手动删除~/.local/share/keyrings目录下的密钥环文件。
老的密钥环文件被移除后您再打开Chrome/Chromium时它会提示您创建一个新的密钥环。
![New Keyring Password][17]
您可以用新的登录密码,密钥环就会被自动解锁了。
### 禁用密钥环密码
在您想用自动登录但又不想手动解锁密钥环时,您可以把禁用密钥环密码作为一个规避方法。记住您正在禁用一个安全特性,因此请三思。
操作步骤和修改密钥环相似。打开密码和密钥应用程序,然后修改密钥环密码。
技巧在于当它提示修改密码时,不要输入新密码,而是点击继续按钮。这将移除密钥环的密码。
![Disable Keyring password by not setting any password at all][18]
这种方法,密钥环没有密码保护并将一直处于解锁状态。
--------------------------------------------------------------------------------
via: https://itsfoss.com/ubuntu-keyring/
作者:[Abhishek Prakash][a]
选题:[lujun9972][b]
译者:[messon007](https://github.com/messon007)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/abhishek/
[b]: https://github.com/lujun9972
[1]: https://itsfoss.com/ubuntu-automatic-logon/
[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/03/enter-password-to-unlock-your-login-keyring-ubuntu.jpg?ssl=1
[3]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/03/keyring-concept-ubuntu-1.png?ssl=1
[4]: https://en.wikipedia.org/wiki/Keychain
[5]: https://wiki.archlinux.org/index.php/GNOME/Keyring
[6]: https://itsfoss.com/install-chrome-ubuntu/
[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/03/sync-paused-keyring-ubuntu.jpg?ssl=1
[8]: https://wiki.debian.org/Seahorse
[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/03/password-and-keys-app-ubuntu.jpg?ssl=1
[10]: https://help.ubuntu.com/lts/serverguide/certificates-and-security.html
[11]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/03/keyring-pasword-ubuntu.png?ssl=1
[12]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/03/saving-new-password-seahorse.png?ssl=1
[13]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/03/change-keyring-password.png?ssl=1
[14]: https://itsfoss.com/how-to-hack-ubuntu-password/
[15]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/03/delete-keyring-ubuntu.jpg?ssl=1
[16]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/03/delete-keyring.jpg?ssl=1
[17]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/03/new-keyring-password.jpg?ssl=1
[18]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/03/disable-keyring-password-ubuntu.png?ssl=1

View File

@ -1,153 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: (MjSeven)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Scheduling tasks on Linux using the at command)
[#]: via: (https://www.networkworld.com/article/3535808/scheduling-tasks-on-linux-using-the-at-command.html)
[#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/)
使用 at 命令在 Linu 上安排任务
======
at 命令可以很容易地安排 Linux 任务在你选择的任何时间或日期运行,让我们来看看它能为你做什么。
![][0]
romkaz / Getty Images
当你希望命令或脚本在某个特定时间运行时,你不需要将手指放在键盘上盘旋等待按下回车键,或者是在特定时间坐在办公桌前。相反,你可以通过 **at** 命令来设置任务。在本文中,我们将研究如何使用 **at** 来安排任务,如何精确地选择任务希望运行的时间以及如何使用 **at** 来查看安排运行的任务。
### at vs cron
对于那些使用 **cron** 在 Linux 系统上安排任务的人来说,**at** 命令类似于 **cron**,因为你可以在选定的时间调度任务,但是 **cron** 用于定期运行的作业 - 甚至是每年仅一次。大多数 **cron** 作业的频率都设置为每天、每周或每月运行一次,不过你可以控制运行的频率和时间。
另一方面,**at** 命令用于仅运行一次的任务。想在午夜重启系统?没问题,假设你有适当的权限,**at** 可以为你完成此操作。如果你希望系统在每个星期六凌晨 2 点重启,那么改用 **cron**
### 使用 at
**at** 命令很容易使用,只需记住几件事。一个简单使用 **at** 的例子类似于这样:
```
$ at 5:00PM
at> date >> thisfile
at> <EOT>
```
在输入 "at" 和应该运行命令的时间,**at** 会提示你在设定时间会运行该命令(此例中是 **`date`** 命令)。输入 **^D**(Ctrl + d) 来完成请求。
假设我们在下午 5 点之前设置这个 **at** 命令,那么日期和时间将在当天下午 5 点添加到名为 "thisfile" 文件的末尾。否则,该命令将在第二天下午 5 点运行。
**at** 命令进行交互时,可以输入多个命令。如果你要同时运行多个命令,只需输入多个命令行即可:
[][1]
```
$ at 6:22
warning: commands will be executed using /bin/sh
at> echo first >> thisfile
at> echo second >> thisfile
at> <EOT>
```
在上面的命令中,我们使用了一个普通的用户账户,将一些简单的文本添加到该用户主目录的文件中。如果在上午 6:22 之后运行这些命令,那么命令会在第二天运行,因为 6:22 表示上午 6:22。如果你想在下午 6:22 运行,使用 6:22 PM 或者 18:22"6:22 PM" 也可以。
你也可以通过使用 **at** 来安排命令在指定的日期或时间运行,例如 "10:00AM April 15 2021" 或 "noon + 5 days"(从今天起 5 天内的中午运行),以下是一些例子:
```
at 6PM tomorrow
at noon April 15 2021
at noon + 5 days
at 9:15 + 1000 days
```
在指定要运行的命令并按下 **^D** 后,你会注意到 **at** 命令为每个请求分配了一个作业编号,这个数字将显示在 **at** 命令的作业队列中。
```
$ at noon + 1000 days
warning: commands will be executed using /bin/sh
at> date >> thisfile
at> <EOT>
job 36 at Tue Dec 27 12:00:00 2022 <== job # is 36
```
### 检查队列
你可以使用 **atq**(at queue) 命令来查看 **at** 作业队列:
```
$ atq
32 Thu Apr 2 03:06:00 2020 a shs
35 Mon Apr 6 12:00:00 2020 a shs
36 Tue Dec 27 12:00:00 2022 a shs
34 Thu Apr 2 18:00:00 2020 a shs
```
如果你需要取消队列中的一个作业,使用 **atrm**(at remote) 命令和作业编号:
```
$ atrm 32
$ atq
35 Mon Apr 6 12:00:00 2020 a shs
36 Tue Dec 27 12:00:00 2022 a shs
34 Thu Apr 2 18:00:00 2020 a shs
```
你可以使用 **at -c** 命令来查看安排任务的详细信息,其它详细信息(活动的搜索路径等)也可以,但是输出的最后一行将显示计划运行的命令。
```
$ at -c 36 | tail -6
cd /home/shs || {
echo 'Execution directory inaccessible' >&2
exit 1
}
date >> thisfile
```
注意,命令首先会测试是否可以通过 **cd** 命令进入用户目录。如果不可以,作业将退出并显示错误。如果可以,则运行在 **at** 中指定的命令。它将命令视为 “进入 /home/shs 或退出并显示错误”。
### 以 root 身份运行作业
要以 root 身份运行 **at** 作业,只需将 **sudo** 与你的 **at** 命令一起使用,如下所示:
```
$ sudo at 8PM
[sudo] password for shs:
warning: commands will be executed using /bin/sh
at> reboot now
at> <EOT>
job 37 at Wed Apr 1 16:00:00 2020
```
注意root 的任务以 **root** 作为执行者显示在队列中。
```
35 Mon Apr 6 12:00:00 2020 a shs
36 Tue Dec 27 12:00:00 2022 a shs
37 Wed Apr 1 20:00:00 2020 a root <==
```
### 运行脚本
你还可以使用 **at** 命令来运行脚本,这里有一个例子:
```
$ at 4:30PM
warning: commands will be executed using /bin/sh
at> bin/tryme
at> <EOT>
```
### 禁止使用 at 命令
**/etc/at.deny** 文件提供了一种禁止用户使用 **at** 命令的方法。默认情况下,它可能会包含一个不允许的账户列表,例如 **ftp****nobody**。可以使用 **/etc/at.allow** 文件执行相反的操作,但是通常只配置 **at.deny** 文件。
**总结**
当你要安排一项一次性任务时,无论你是希望在今天下午或几年后运行,**at** 命令都是通用且易于使用的。
--------------------------------------------------------------------------------
via: https://www.networkworld.com/article/3535808/scheduling-tasks-on-linux-using-the-at-command.html
作者:[Sandra Henry-Stocker][a]
选题:[lujun9972][b]
译者:[MjSeven](https://github.com/MjSeven)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.networkworld.com/author/Sandra-Henry_Stocker/
[b]: https://github.com/lujun9972
[0]: https://images.idgesg.net/images/article/2019/08/gettyimages-140389307-100808283-large.jpg
[1]: https://www.networkworld.com/blog/itaas-and-the-corporate-storage-technology/?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE22140&utm_content=sidebar (ITAAS and Corporate Storage Strategy)
[2]: https://www.facebook.com/NetworkWorld/
[3]: https://www.linkedin.com/company/network-world