mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-03-12 01:40:10 +08:00
commit
3d73f090b0
@ -0,0 +1,98 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (robsean)
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-13184-1.html)
|
||||
[#]: subject: (Run your favorite Windows applications on Linux)
|
||||
[#]: via: (https://opensource.com/article/21/2/linux-wine)
|
||||
[#]: author: (Seth Kenlon https://opensource.com/users/seth)
|
||||
|
||||
在 Linux 上运行你最喜欢的 Windows 应用程序
|
||||
======
|
||||
|
||||
> WINE 是一个开源项目,它可以协助很多 Windows 应用程序在 Linux 上运行,就好像它们是原生程序一样。
|
||||
|
||||

|
||||
|
||||
在 2021 年,有很多比以往更喜欢 Linux 的原因。在这系列中,我将分享使用 Linux 的 21 种原因。这里是如何使用 WINE 来实现从 Windows 到 Linux 的无缝切换。
|
||||
|
||||
你有只能在 Windows 上运行的应用程序吗?那一个应用程序阻碍你切换到 Linux 的唯一因素吗?如果是这样的话,你将会很高兴知道 WINE,这是一个开源项目,它几乎重新发明了关键的 Windows 库,使为 Windows 编译的应用程序可以在 Linux 上运行。
|
||||
|
||||
WINE 代表着“Wine Is Not an Emulator” ,它指的是驱动这项技术的代码。开源开发者从 1993 年就开始致力将应用程序的任何传入 Windows API 调用翻译为 [POSIX][2] 调用。
|
||||
|
||||
这是一个令人十分惊讶的编程壮举,尤其是考虑到这个项目是独立运行的,没有来自微软的帮助(至少可以这样说),但是也有局限性。一个应用程序偏离 Windows API 的 “内核” 越远,WINE 就越不能预期应用程序的请求。有一些供应商可以弥补这一点,尤其是 [Codeweavers][3] 和 [Valve Software][4]。在需要翻译应用程序的制作者和翻译的人们及公司之间没有协调配合,因此,比如说一个更新的软件作品和从 [WINE 总部][5] 获得完美适配状态之间可能会有一些时间上的滞后。
|
||||
|
||||
然而,如果你想在 Linux 上运行一个著名的 Windows 应用程序,WINE 可能已经为它准备好了可能性。
|
||||
|
||||
### 安装 WINE
|
||||
|
||||
你可以从你的 Linux 发行版的软件包存储库中安装 WINE 。在 Fedora、CentOS Stream 或 RHEL 系统上:
|
||||
|
||||
```
|
||||
$ sudo dnf install wine
|
||||
```
|
||||
|
||||
在 Debian、Linux Mint、Elementary 及相似的系统上:
|
||||
|
||||
```
|
||||
$ sudo apt install wine
|
||||
```
|
||||
|
||||
WINE 不是一个你自己启动的应用程序。当启动一个 Windows 应用程序时,它是一个被调用的后端。你与 WINE 的第一次交互很可能就发生在你启动一个 Windows 应用程序的安装程序时。
|
||||
|
||||
### 安装一个应用程序
|
||||
|
||||
[TinyCAD][6] 是一个极好的用于设计电路的开源应用程序,但是它仅在 Windows 上可用。虽然它是一个小型的应用程序,但是它确实包含一些 .NET 组件,因此应该能对 WINE 进行一些压力测试。
|
||||
|
||||
首先,下载 TinyCAD 的安装程序。Windows 安装程序通常都是这样,它是一个 `.exe` 文件。在下载后,双击文件来启动它。
|
||||
|
||||
![WINE TinyCAD 安装向导][7]
|
||||
|
||||
*TinyCAD 的 WINE 安装向导*
|
||||
|
||||
像你在 Windows 上一样逐步完成安装程序。通常最好接受默认选项,尤其是与 WINE 有关的地方。WINE 环境基本上是独立的,隐藏在你的硬盘驱动器上的一个 `drive_c` 目录中,作为 Windows 应用程序使用的一个文件系统的仿真根目录。
|
||||
|
||||
![WINE TinyCAD 安装和目标驱动器][8]
|
||||
|
||||
*WINE TinyCAD 目标驱动器*
|
||||
|
||||
安装完成后,应用程序通常会为你提供启动机会。如果你正准备测试一下它的话,启动应用程序。
|
||||
|
||||
### 启动 Windows 应用程序
|
||||
|
||||
除了在安装后的第一次启动外,在正常情况下,你启动一个 WINE 应用程序的方式与你启动一个本地 Linux 应用程序相同。不管你使用应用程序菜单、活动屏幕或者只是在运行器中输入应用程序的名称,在 WINE 中运行的桌面 Windows 应用程序都会被视为在 Linux 上的本地应用程序。
|
||||
|
||||
![TinyCAD 使用 WINE 运行][9]
|
||||
|
||||
*通过 WINE 的支持来运行 TinyCAD*
|
||||
|
||||
### 当 WINE 失败时
|
||||
|
||||
我在 WINE 中的大多数应用程序,包括 TinyCAD ,都能如期运行。不过,也会有例外。在这些情况下,你可以等几个月来查看 WINE 开发者 (或者,如果是一款游戏,就等候 Valve Software)是否进行追加修补,或者你可以联系一个像 Codeweavers 这样的供应商来查看他们是否出售对你所需要的应用程序的服务支持。
|
||||
|
||||
### WINE 是种欺骗,但它用于正道
|
||||
|
||||
一些 Linux 用户觉得:如果你使用 WINE 的话,你就是在“欺骗” Linux。它可能会让人有这种感觉,但是 WINE 是一个开源项目,它使用户能够切换到 Linux ,并且仍然能够运行工作或爱好所需的应用程序。如果 WINE 解决了你的问题,让你使用 Linux,那就使用它,并拥抱 Linux 的灵活性。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/21/2/linux-wine
|
||||
|
||||
作者:[Seth Kenlon][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[robsean](https://github.com/robsean)
|
||||
校对:[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/browser_screen_windows_files.png?itok=kLTeQUbY (Computer screen with files or windows open)
|
||||
[2]: https://opensource.com/article/19/7/what-posix-richard-stallman-explains
|
||||
[3]: https://www.codeweavers.com/crossover
|
||||
[4]: https://github.com/ValveSoftware/Proton
|
||||
[5]: http://winehq.org
|
||||
[6]: https://sourceforge.net/projects/tinycad/
|
||||
[7]: https://opensource.com/sites/default/files/wine-tinycad-install.jpg
|
||||
[8]: https://opensource.com/sites/default/files/wine-tinycad-drive_0.jpg
|
||||
[9]: https://opensource.com/sites/default/files/wine-tinycad-running.jpg
|
@ -3,16 +3,18 @@
|
||||
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-13182-1.html)
|
||||
|
||||
如何在 Ubuntu Linux 上安装最新的 Erlang?
|
||||
如何在 Ubuntu Linux 上安装最新的 Erlang
|
||||
======
|
||||
|
||||
[Erlang][1] 是一种用于构建大规模可扩展实时系统的函数式编程语言。Erlang 最初是由[爱立信][2]创建的专有软件,后来被开源。
|
||||

|
||||
|
||||
Erlang 在 [Ubuntu 的 Universe 仓库][3]中可用。启用该仓库后,你可以使用下面的命令轻松安装它:
|
||||
[Erlang][1] 是一种用于构建大规模可扩展实时系统的函数式编程语言。Erlang 最初是由 [爱立信][2] 创建的专有软件,后来被开源。
|
||||
|
||||
Erlang 在 [Ubuntu 的 Universe 仓库][3] 中可用。启用该仓库后,你可以使用下面的命令轻松安装它:
|
||||
|
||||
```
|
||||
sudo apt install erlang
|
||||
@ -20,36 +22,35 @@ sudo apt install erlang
|
||||
|
||||
![][4]
|
||||
|
||||
但是,_**Ubuntu 仓库提供的 Erlang 版本可能不是最新的**_。
|
||||
但是,*Ubuntu 仓库提供的 Erlang 版本可能不是最新的*。
|
||||
|
||||
|
||||
如果你想要 _**Ubuntu 上最新的 Erlang 版本**_,你可以添加 [Erlang Solutions 提供的][5]仓库。它们为各种 Linux 发行版、Windows 和 macOS 提供了预编译的二进制文件。
|
||||
如果你想要 Ubuntu 上最新的 Erlang 版本,你可以添加 [Erlang Solutions 提供的][5]仓库。它们为各种 Linux 发行版、Windows 和 macOS 提供了预编译的二进制文件。
|
||||
|
||||
如果你之前安装了一个名为 `erlang` 的包,那么它将会被升级到由添加的仓库提供的较新版本。
|
||||
|
||||
### 在 Ubuntu 上安装最新版本的 Erlang
|
||||
|
||||
你需要[在 Linux 终端下载密钥文件][6]。你可以使用 wget 工具,所以请确保你已经安装了它:
|
||||
你需要[在 Linux 终端下载密钥文件][6]。你可以使用 `wget` 工具,所以请确保你已经安装了它:
|
||||
|
||||
```
|
||||
sudo apt install wget
|
||||
```
|
||||
|
||||
接下来,使用 wget 下载 Erlang Solution 仓库的 GPG 密钥,并将其添加到你的 apt 打包系统中。添加了密钥后,你的系统就会信任来自该仓库的包。
|
||||
接下来,使用 `wget` 下载 Erlang Solution 仓库的 GPG 密钥,并将其添加到你的 apt 打包系统中。添加了密钥后,你的系统就会信任来自该仓库的包。
|
||||
|
||||
```
|
||||
wget -O- https://packages.erlang-solutions.com/ubuntu/erlang_solutions.asc | sudo apt-key add -
|
||||
```
|
||||
|
||||
现在,你应该在你的 APT sources.list.d 目录下为 Erlang 添加一个文件,这个文件将包含有关仓库的信息,APT 包管理器将使用它来获取包和未来的更新。
|
||||
现在,你应该在你的 APT `sources.list.d` 目录下为 Erlang 添加一个文件,这个文件将包含有关仓库的信息,APT 包管理器将使用它来获取包和未来的更新。
|
||||
|
||||
**对于 Ubuntu 20.04(和Ubuntu 20.10)**,使用以下命令:
|
||||
对于 Ubuntu 20.04(和 Ubuntu 20.10),使用以下命令:
|
||||
|
||||
```
|
||||
echo "deb https://packages.erlang-solutions.com/ubuntu focal contrib" | sudo tee /etc/apt/sources.list.d/erlang-solution.list
|
||||
```
|
||||
|
||||
我知道上面的命令提到了 focal(适用于 Ubuntu 20.04),但它也适用于 Ubuntu 20.10 groovy。
|
||||
我知道上面的命令提到了 Ubuntu 20.04 focal,但它也适用于 Ubuntu 20.10 groovy。
|
||||
|
||||
对于 **Ubuntu 18.04**,使用以下命令:
|
||||
|
||||
@ -73,7 +74,7 @@ sudo apt install erlang
|
||||
|
||||
![][7]
|
||||
|
||||
要退出 Erlang shell,使用 Ctrl+g,然后输入 q,由于我从来没有用过 Erlang,所以我只好尝试了一些按键,然后发现做法。
|
||||
要退出 Erlang shell,使用 `Ctrl+g`,然后输入 `q`,由于我从来没有用过 Erlang,所以我只好尝试了一些按键,然后发现了操作方法。
|
||||
|
||||
#### 删除 erlang
|
||||
|
||||
@ -104,7 +105,7 @@ via: https://itsfoss.com/install-erlang-ubuntu/
|
||||
作者:[Abhishek Prakash][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/) 荣誉推出
|
||||
|
@ -1,5 +1,5 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: translator: (stevenzdg988)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
@ -161,7 +161,7 @@ via: https://opensource.com/article/20/10/moodle
|
||||
|
||||
作者:[Don Watkins][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
译者:[stevenzdg988](https://github.com/stevenzdg988)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
@ -2,7 +2,7 @@
|
||||
[#]: via: (https://www.linux.com/news/an-introduction-to-webassembly/)
|
||||
[#]: author: (Dan Brown https://training.linuxfoundation.org/announcements/an-introduction-to-webassembly/)
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
@ -1,104 +0,0 @@
|
||||
[#]: subject: (You Can Now Install Official Evernote Client on Ubuntu and Debian-based Linux Distributions)
|
||||
[#]: via: (https://itsfoss.com/install-evernote-ubuntu/)
|
||||
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
||||
You Can Now Install Official Evernote Client on Ubuntu and Debian-based Linux Distributions
|
||||
======
|
||||
|
||||
[Evernote][1] is a popular note-taking application. It was a revolutionary product at the time of its launch. Since then, there have been several such application that allow you to save web clippings, notes etc into notebook formats.
|
||||
|
||||
For years, the desktop client of Evernote was not available for Linux. Evernote promised a Linux application some time ago and its beta version is finally available for Ubuntu-based distributions.
|
||||
|
||||
Non-FOSS alert!
|
||||
|
||||
Evernote Linux client is not open source. It’s been covered here because the application is made available on Linux and we cover popular non-foss applications for Linux users from time to time. This helps with regular desktop Linux users.
|
||||
|
||||
### Installing Evernote on Ubuntu and Debian-based Linux distributions
|
||||
|
||||
Go to the following page on Evernote’s website:
|
||||
|
||||
[Evernote Linux Beta Program][2]
|
||||
|
||||
Scroll down a bit to accept the terms and conditions of ‘early testing program’. You’ll see a ‘Install Now’ button appearing on the screen. Click on it to download the DEB file.
|
||||
|
||||
![][3]
|
||||
|
||||
To [install the application from the DEB file][4], double-click on it. It should open the Software Center app and give you the option to install it.
|
||||
|
||||
![][5]
|
||||
|
||||
Once the installation completes, search for Evernote in the system menu and launch it.
|
||||
|
||||
![][6]
|
||||
|
||||
When you start the application for the first time, you’ll need to log in to your Evernote account.
|
||||
|
||||
![][7]
|
||||
|
||||
The first run brings you to the ‘Home screen’ where you can organize your notebooks for even quicker access.
|
||||
|
||||
![][8]
|
||||
|
||||
You may enjoy using Evernote on Linux now.
|
||||
|
||||
### Experiencing the beta version of Evernote Linux client
|
||||
|
||||
There are a few annoyances here and there with the software being in beta.
|
||||
|
||||
As you can notice in the image above, Evernote Linux client detected the [dark mode in Ubuntu][9] and switched to dark theme automatically. However, when I changed the system theme to light or standard, it didn’t change theme application theme immediately. The changes took into effect only after I restarted Evernote app.
|
||||
|
||||
Another issue is about closing the application. If you click on the X button to close the Evernote application, the program goes in background instead of exiting.
|
||||
|
||||
There is an app indicator that seems like a way to launch a minimized Evernote application, like [Skype on Linux][10]. Unfortunately, that’s not the case. It opens the Scratch Pad for you to type a quick note.
|
||||
|
||||
This gives you another [note taking application on Linux][11] but it also presents a problem. There is no option to quit Evernote here. It is only for opening the quick note taking app.
|
||||
|
||||
![][12]
|
||||
|
||||
So, how do you quit the Evernote application? For that, open the Evernote application again. If it is running in the background, search for it in the menu and launch it as if you are opening it afresh.
|
||||
|
||||
When Evernote application is running in the foreground, go to File->Quit Evernote.
|
||||
|
||||
![][13]
|
||||
|
||||
This is something the developers should look to improve in the future versions.
|
||||
|
||||
I also cannot say how will the beta version of the program be updated in the future. It doesn’t add any repository. I just hope that the application itself notifies about the availability of a newer version so that users could download the new DEB file.
|
||||
|
||||
I do NOT have a premium Evernote subscription but still, I could access the saved web articles and notes without internet connection. Strange, right?
|
||||
|
||||
Overall, I am happy to see that Evernote finally made the effort to bring the application to Linux. Now you don’t have to try third-party applications to use Evernote on Linux, at least on Ubuntu and Debian-based distributions. You may, of course, use an [Evernote alternative][14] like [Joplin][15] that are actually open source.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/install-evernote-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://evernote.com/
|
||||
[2]: https://evernote.com/intl/en/b1433t1422
|
||||
[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/03/evernote-early-access-linux.png?resize=799%2C495&ssl=1
|
||||
[4]: https://itsfoss.com/install-deb-files-ubuntu/
|
||||
[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/03/install-evernote-linux.png?resize=800%2C539&ssl=1
|
||||
[6]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/03/evernote-ubuntu.jpg?resize=800%2C230&ssl=1
|
||||
[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/03/evernote-running-ubuntu.png?resize=800%2C505&ssl=1
|
||||
[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/03/evernote-on-ubuntu.png?resize=800%2C537&ssl=1
|
||||
[9]: https://itsfoss.com/dark-mode-ubuntu/
|
||||
[10]: https://itsfoss.com/install-skype-ubuntu-1404/
|
||||
[11]: https://itsfoss.com/note-taking-apps-linux/
|
||||
[12]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/03/evernote-app-indicator.png?resize=800%2C480&ssl=1
|
||||
[13]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/03/quit-evernote-linux.png?resize=799%2C448&ssl=1
|
||||
[14]: https://itsfoss.com/5-evernote-alternatives-linux/
|
||||
[15]: https://itsfoss.com/joplin/
|
@ -0,0 +1,186 @@
|
||||
[#]: subject: (5 surprising things you can do with LibreOffice from the command line)
|
||||
[#]: via: (https://opensource.com/article/21/3/libreoffice-command-line)
|
||||
[#]: author: (Don Watkins https://opensource.com/users/don-watkins)
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
||||
5 surprising things you can do with LibreOffice from the command line
|
||||
======
|
||||
Convert, print, protect, and do more with your files directly from the
|
||||
command line.
|
||||
![hot keys for shortcuts or features on computer keyboard][1]
|
||||
|
||||
LibreOffice has all the productivity features you'd want from an office software suite, making it a popular open source alternative to Microsoft Office or Google Suite. One of LibreOffice's powers is the ability to operate from the command line. For example, Seth Kenlon recently explained how he uses a global [command-line option to convert multiple files][2] from DOCX to EPUB with LibreOffice. His article inspired me to share some other LibreOffice command-line tips and tricks.
|
||||
|
||||
Before we look at some hidden features of LibreOffice commands, you need to understand how to use options with applications. Not all applications accept options (aside from the basics like the `--help` option, which works in most Linux applications).
|
||||
|
||||
|
||||
```
|
||||
`$ libreoffice --help`
|
||||
```
|
||||
|
||||
This returns descriptions of other options LibreOffice accepts. Some applications don't have many options, but LibreOffice has a few screens worth, so there's plenty to play with.
|
||||
|
||||
That said, here are five useful things you can do with LibreOffice at the terminal to make the software even more useful.
|
||||
|
||||
### 1\. Customize your launch options
|
||||
|
||||
You can modify how you launch LibreOffice. For instance, if you want to open just LibreOffice's word processor component:
|
||||
|
||||
|
||||
```
|
||||
`$ libreoffice --writer #starts the word processor`
|
||||
```
|
||||
|
||||
You can open its other components similarly:
|
||||
|
||||
|
||||
```
|
||||
$ libreoffice --calc #starts the Calc document
|
||||
$ libreoffice --draw #starts an empty Draw document
|
||||
$ libreoffice --web #starts and empty HTML document
|
||||
```
|
||||
|
||||
You also can access specific help files from the command line:
|
||||
|
||||
|
||||
```
|
||||
`$ libreoffice --helpwriter`
|
||||
```
|
||||
|
||||
![LibreOffice Writer help][3]
|
||||
|
||||
(Don Watkins, [CC BY-SA 4.0][4])
|
||||
|
||||
Or if you need help with the spreadsheet application:
|
||||
|
||||
|
||||
```
|
||||
`$ libreoffice --helpcalc`
|
||||
```
|
||||
|
||||
You can start LibreOffice without the splash screen:
|
||||
|
||||
|
||||
```
|
||||
`$ libreoffice --writer --nologo`
|
||||
```
|
||||
|
||||
You can even have it launch minimized in the background while you finish working in your current window:
|
||||
|
||||
|
||||
```
|
||||
`$ libreoffice --writer --minimized`
|
||||
```
|
||||
|
||||
### 2\. Open a file in read-only mode
|
||||
|
||||
You can open files in read-only mode using `--view` to prevent accidentally making and saving changes to an important file:
|
||||
|
||||
|
||||
```
|
||||
`$ libreoffice --view example.odt`
|
||||
```
|
||||
|
||||
### 3\. Open a document as a template
|
||||
|
||||
Have you ever created a document to use as a letterhead or invoice form? LibreOffice has a rich built-in template system, but you can make any document a template with the `-n` option:
|
||||
|
||||
|
||||
```
|
||||
`$ libreoffice --writer -n example.odt`
|
||||
```
|
||||
|
||||
Your document will open in LibreOffice and you can make changes to it, but you won't overwrite the original file when you save it.
|
||||
|
||||
### 4\. Convert documents
|
||||
|
||||
When you need to do a small task like converting a file to a new format, it can take as long for the application to launch as it takes to do the task. The solution is the `--headless` option, which executes LibreOffice processes without launching the graphical user interface.
|
||||
|
||||
For example, converting a document to EPUB is a pretty simple task in LibreOffice—but it's even easier with the `libreoffice` command:
|
||||
|
||||
|
||||
```
|
||||
`$ libreoffice --headless --convert-to epub example.odt`
|
||||
```
|
||||
|
||||
Using wildcards means you can convert dozens of documents at once:
|
||||
|
||||
|
||||
```
|
||||
`$ libreoffice --headless --convert-to epub *.odt`
|
||||
```
|
||||
|
||||
You can convert files to several formats, including PDF, HTML, DOC, DOCX, EPUB, plain text, and many more.
|
||||
|
||||
### 5\. Print from the terminal
|
||||
|
||||
You can print LibreOffice documents from the command line without opening the application:
|
||||
|
||||
|
||||
```
|
||||
`$ libreoffice --headless -p example.odt`
|
||||
```
|
||||
|
||||
This option prints to the default printer without opening LibreOffice; it just sends the document to your printer.
|
||||
|
||||
To print all the files in a directory:
|
||||
|
||||
|
||||
```
|
||||
`$ libreoffice -p *.odt`
|
||||
```
|
||||
|
||||
(More than once, I've issued this command and then run out of paper, so make sure you have enough paper loaded in your printer before you start.)
|
||||
|
||||
You can also print files to PDF. There's usually no difference between this and using the `--convert-to-pdf` option but it's easy to remember:
|
||||
|
||||
|
||||
```
|
||||
`$ libreoffice --print-to-file example.odt --headless`
|
||||
```
|
||||
|
||||
### Bonus: Flatpak and command options
|
||||
|
||||
If you installed LibreOffice as a [Flatpak][5], all of these command options work, but you have to pass them through Flatpak. Here's an example:
|
||||
|
||||
|
||||
```
|
||||
`$ flatpak run org.libreoffice.LibreOffice --writer`
|
||||
```
|
||||
|
||||
It's a lot more verbose than a local install, so you might be inspired to [write a Bash alias][6] to make it easier to interact with LibreOffice directly.
|
||||
|
||||
### Surprising terminal options
|
||||
|
||||
Find out how you can extend the power of LibreOffice from the command line by consulting the man pages:
|
||||
|
||||
|
||||
```
|
||||
`$ man libreoffice`
|
||||
```
|
||||
|
||||
Were you aware that LibreOffice had such a rich set of command-line options? Have you discovered other options that nobody else seems to know about? Share them in the comments!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/21/3/libreoffice-command-line
|
||||
|
||||
作者:[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/shortcut_command_function_editing_key.png?itok=a0sEc5vo (hot keys for shortcuts or features on computer keyboard)
|
||||
[2]: https://opensource.com/article/21/2/linux-workday
|
||||
[3]: https://opensource.com/sites/default/files/uploads/libreoffice-help.png (LibreOffice Writer help)
|
||||
[4]: https://creativecommons.org/licenses/by-sa/4.0/
|
||||
[5]: https://www.libreoffice.org/download/flatpak/
|
||||
[6]: https://opensource.com/article/19/7/bash-aliases
|
@ -0,0 +1,105 @@
|
||||
[#]: subject: (5 useful Moodle plugins to engage students)
|
||||
[#]: via: (https://opensource.com/article/21/3/moodle-plugins)
|
||||
[#]: author: (Sergey Zarubin https://opensource.com/users/sergey-zarubin)
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
||||
5 useful Moodle plugins to engage students
|
||||
======
|
||||
Use plugins to give your e-learning platform new capabilities that
|
||||
motivate students.
|
||||
![Person reading a book and digital copy][1]
|
||||
|
||||
A good e-learning platform is important for education all over the world. Teachers need a way to hold classes, students need a friendly user interface to facilitate learning, and administrators need a way to monitor the educational system's effectiveness.
|
||||
|
||||
Moodle is an open source software package that allows you to create a private website with interactive online courses. It's helping people gather virtually, teach and learn from one another, and stay organized while doing it.
|
||||
|
||||
What makes Moodle unique is its high usability that can significantly increase with third-party solutions. If you visit the [Moodle plugins directory][2], you'll find over 1,700 plugins developed by the open source community.
|
||||
|
||||
Picking the best plugins for your learners might be a challenge with so many choices. To help get you started, here my top five plugins to add to your e-learning platform.
|
||||
|
||||
### Level up!
|
||||
|
||||
![Level up Moodle plugin][3]
|
||||
|
||||
Level up! Source: <https://levelup.plus/>
|
||||
|
||||
Motivating and engaging learners is one of the most difficult tasks for educators. The [Level up plugin][4] allows you to gamify the learning experience by attributing points to students for completing actions and allowing them to show progress and level up. This encourages your students to compete in a healthy atmosphere and be better learners.
|
||||
|
||||
What's more, you can take total control over the points your students earn, and they can unlock content when they reach a certain level. All of these features are available for free. If you are ready to pay, you can buy some extra functionality, such as individual rewards and team leaderboards.
|
||||
|
||||
### BigBlueButton
|
||||
|
||||
![BigBlueButton Moodle plugin][5]
|
||||
|
||||
BigBlueButton. Source: <https://bigbluebutton.org/>
|
||||
|
||||
[BigBlueButton][6] is probably the most well-known Moodle plugin. This open source videoconferencing solution allows educators to engage remote students with live online classes and group collaboration activities. It offers important features such as real-time screen sharing, audio and video calls, chat, emojis, and breakout rooms. This plugin also allows you to record your live sessions.
|
||||
|
||||
BigBlueButton enables you to create multiple activity links within any course, restrict your students from joining a session until you join, create a custom welcome message, manage your recordings, and more. All in all, BigBlueButton has everything you need to teach and participate in online classes.
|
||||
|
||||
### ONLYOFFICE
|
||||
|
||||
![ONLYOFFICE Moodle plugin][7]
|
||||
|
||||
ONLYOFFICE. Source: <https://www.onlyoffice.com/>
|
||||
|
||||
The [ONLYOFFICE plugin][8] allows learners and educators to create and edit text documents, spreadsheets, and presentations right in their browser. Without installing any additional apps, they can work with .docx, .xlsx, .pptx, .txt, and .csv files attached to their courses; open .pdf files for viewing; and apply advanced formatting and objects including autoshapes, tables, charts, equations, and more.
|
||||
|
||||
Moreover, ONLYFFICE makes it possible to co-edit documents in real time, which means several users can simultaneously work on the same document. Different permission rights (full access, commenting, reviewing, read-only, and form filling) make it easier to manage access to your documents flexibly.
|
||||
|
||||
### Global Chat
|
||||
|
||||
![Global Chat Moodle plugin][9]
|
||||
|
||||
Global Chat. Source: <https://moodle.org/plugins/block_gchat>
|
||||
|
||||
The [Global Chat plugin][10] allows educators and learners to communicate in real time via Moodle. The plugin provides a list of all the users in your courses, and when you click a user's name, it opens a chat window at the bottom of the page so that you can communicate.
|
||||
|
||||
With this easy-to-use tool, you don't need to open a separate window to start an online conversation. You can change between web pages, and your conversations will always remain open.
|
||||
|
||||
### Custom certificate
|
||||
|
||||
![Custom certificate Moodle plugin][11]
|
||||
|
||||
Custom certificate. Source: <https://moodle.org/plugins/mod_customcert>
|
||||
|
||||
Another effective way to engage students is to offer certificates as a reward for course completion. The promise of a completion certificate helps keep students on track and committed to their training.
|
||||
|
||||
The [Custom certificate plugin][12] allows you to generate fully customizable PDF certificates in your web browser. Importantly, the plugin is compatible with GDPR requirements, and the certificates have unique verification codes, so you can use them for authentic accreditation.
|
||||
|
||||
### Oodles of Moodle plugins
|
||||
|
||||
These are my top five favorite Moodle plugins. You can try them out by [signing up for an account][13] on Moodle.org, or you can host your own installation (or talk to your systems administrator or IT staff to set one up for you).
|
||||
|
||||
If these plugins aren't the right options for your learning goals, take a look at the many other plugins available. If you find a good one, leave a comment and tell everyone about it!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/21/3/moodle-plugins
|
||||
|
||||
作者:[Sergey Zarubin][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/sergey-zarubin
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/read_book_guide_tutorial_teacher_student_apaper.png?itok=_GOufk6N (Person reading a book and digital copy)
|
||||
[2]: https://moodle.org/plugins/
|
||||
[3]: https://opensource.com/sites/default/files/uploads/gamification.png (Level up Moodle plugin)
|
||||
[4]: https://moodle.org/plugins/block_xp
|
||||
[5]: https://opensource.com/sites/default/files/uploads/bigbluebutton.png (BigBlueButton Moodle plugin)
|
||||
[6]: https://moodle.org/plugins/mod_bigbluebuttonbn
|
||||
[7]: https://opensource.com/sites/default/files/uploads/onlyoffice_editors.png (ONLYOFFICE Moodle plugin)
|
||||
[8]: https://github.com/logicexpertise/moodle-mod_onlyoffice
|
||||
[9]: https://opensource.com/sites/default/files/uploads/global_chat.png (Global Chat Moodle plugin)
|
||||
[10]: https://moodle.org/plugins/block_gchat
|
||||
[11]: https://opensource.com/sites/default/files/uploads/certificate.png (Custom certificate Moodle plugin)
|
||||
[12]: https://moodle.org/plugins/mod_customcert
|
||||
[13]: https://moodle.com/getstarted/
|
@ -0,0 +1,282 @@
|
||||
[#]: subject: (Build a printer UI for Raspberry Pi with XML and Java)
|
||||
[#]: via: (https://opensource.com/article/21/3/raspberry-pi-totalcross)
|
||||
[#]: author: (Edson Holanda Teixeira Junior https://opensource.com/users/edsonhtj)
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
||||
Build a printer UI for Raspberry Pi with XML and Java
|
||||
======
|
||||
TotalCross makes it quick to build user interfaces for embedded
|
||||
applications.
|
||||
![Tips and gears turning][1]
|
||||
|
||||
Creating a GUI from scratch is a very time consuming process, dealing with all the positions and alignments in hard code can be really tough for some programmers. In this article, I demonstrate how to speed up this process using XML.
|
||||
|
||||
This project uses [TotalCross][2] as the target framework. TotalCross is an open source, cross-platform software development kit (SDK) developed to create GUIs for embedded devices faster. TotalCross provides Java's development benefits without needing to run Java on a device because it uses its own bytecode and virtual machine (TC bytecode and TCVM) for performance enhancement.
|
||||
|
||||
I also use Knowcode-XML, an open source XML parser for the TotalCross framework, which converts XML files into TotalCross components.
|
||||
|
||||
### Project requirements
|
||||
|
||||
To reproduce this project, you need:
|
||||
|
||||
* [KnowCode-XML][3]
|
||||
* [VSCode][4] [or VSCodium][5]
|
||||
* [An Android development environment][6]
|
||||
* [TotalCross plugin for VSCode][7]
|
||||
* Java 11 or greater for your development platform ([Linux][8], [Mac][9], or [Windows][10])
|
||||
* [Git][11]
|
||||
|
||||
|
||||
|
||||
### Building the embedded application
|
||||
|
||||
This application consists of an embedded GUI with basic print functionalities, such as scan, print, and copy.
|
||||
|
||||
![printer init screen][12]
|
||||
|
||||
(Edson Holanda Teixeira Jr, [CC BY-SA 4.0][13])
|
||||
|
||||
Several steps are required to create this GUI, including generating the GUI with Android-XML and then using the Knowcode-XML parser to run it on the TotalCross Framework.
|
||||
|
||||
#### 1\. Generate the Android XML
|
||||
|
||||
For creating the XML file, first create a simple Android screen, and then customize it. If you don't know how to write Android-XM, or you just want a headstart, you can download this application’s XML from this [GitHub project][14]. This project also contains the images you need to render the GUI.
|
||||
|
||||
#### 2\. Adjust the XML
|
||||
|
||||
After generating the XML files, you need to make some fine adjustments to make sure everything is aligned, with the right proportions, and has the correct path to the images.
|
||||
|
||||
Add the XML layouts to the **Layouts** folder and all the assets to the **Drawable** folder. Then you can start to customize the XML.
|
||||
|
||||
For example, if you want to change an XML object's background, change the `android:background` attribute:
|
||||
|
||||
|
||||
```
|
||||
`android:background="@drawable/scan"`
|
||||
```
|
||||
|
||||
You can change the object's position with `tools:layout_editor_absoluteX` and `tools:layout_editor_absoluteY`:
|
||||
|
||||
|
||||
```
|
||||
tools:layout_editor_absoluteX="830dp"
|
||||
tools:layout_editor_absoluteY="511dp"
|
||||
```
|
||||
|
||||
Change the object's size with `android:layout_width` and `android:layout_height`:
|
||||
|
||||
|
||||
```
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="70dp"
|
||||
```
|
||||
|
||||
If you want to put text on an object, you can use `android:textSize`, `android:text`, `android:textStyle`, and `android:textColor`:
|
||||
|
||||
|
||||
```
|
||||
android:textStyle="bold"
|
||||
android:textColor="#000000"
|
||||
android:textSize="20dp"
|
||||
android:text="2:45PM"
|
||||
```
|
||||
|
||||
Here is an example of a complete XML object:
|
||||
|
||||
|
||||
```
|
||||
<ImageButton
|
||||
android:id="@+id/ImageButton"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="70dp"
|
||||
tools:layout_editor_absoluteX="830dp"
|
||||
tools:layout_editor_absoluteY="511dp"
|
||||
android:background="@drawable/home_config" />
|
||||
```
|
||||
|
||||
#### 3\. Run the GUI on TotalCross
|
||||
|
||||
After you make all the XML adjustments, it's time to run it on TotalCross. Create a new project on the TotalCross extension and add the **XML** and **Drawable** folders to the **Main** folder. If you're not sure how to create a TotalCross project, see our [get started guide][15].
|
||||
|
||||
After configuring the environment, use `totalcross.knowcode.parse.XmlContainerFactory` and `import totalcross.knowcode.parse.XmlContainerLayout` to use the XML GUI on the TotalCross framework. You can find more information about using KnowCode-XML on its [GitHub page][3].
|
||||
|
||||
#### 4\. Add transitions
|
||||
|
||||
This project's smooth transition effect is created by the `SlidingNavigator` class, which uses TotalCross' `ControlAnimation` class to slide from one screen to the other.
|
||||
|
||||
Call `SlidingNavigator` on the `XMLpresenter` class:
|
||||
|
||||
|
||||
```
|
||||
`new SlidingNavigator(this).present(HomePresenter.class);`
|
||||
```
|
||||
|
||||
Implement the `present` function on the `SlidingNavigator` class:
|
||||
|
||||
|
||||
```
|
||||
public void present(Class<? extends XMLPresenter> presenterClass)
|
||||
throws [InstantiationException][16], [IllegalAccessException][17] {
|
||||
final XMLPresenter presenter = cache.containsKey(presenterClass) ? cache.get(presenterClass)
|
||||
: presenterClass.newInstance();
|
||||
if (!cache.containsKey(presenterClass)) {
|
||||
cache.put(presenterClass, presenter);
|
||||
}
|
||||
|
||||
if (presenters.isEmpty()) {
|
||||
window.add(presenter.content, LEFT, TOP, FILL, FILL);
|
||||
} else {
|
||||
XMLPresenter previous = presenters.lastElement();
|
||||
|
||||
window.add(presenter.content, AFTER, TOP, SCREENSIZE, SCREENSIZE, previous.content);
|
||||
```
|
||||
|
||||
`PathAnimation` in animation control creates the sliding animation from one screen to another:
|
||||
|
||||
|
||||
```
|
||||
PathAnimation.create(previous.content, -Settings.screenWidth, 0, new ControlAnimation.AnimationFinished() {
|
||||
@Override
|
||||
public void onAnimationFinished(ControlAnimation anim) {
|
||||
window.remove(previous.content);
|
||||
}
|
||||
}, 1000).with(PathAnimation.create(presenter.content, 0, 0, new ControlAnimation.AnimationFinished() {
|
||||
@Override
|
||||
public void onAnimation Finished(Control Animation anim) {
|
||||
presenter.content.setRect(LEFT, TOP, FILL, FILL);
|
||||
}
|
||||
}, 1000)).start();
|
||||
}
|
||||
presenter.setNavigator(this);
|
||||
presenters.push(presenter);
|
||||
presenter.bind2();
|
||||
if (presenter.isFirstPresent) {
|
||||
presenter.onPresent();
|
||||
presenter.isFirstPresent = false;
|
||||
}
|
||||
```
|
||||
|
||||
#### 5\. Load spinners
|
||||
|
||||
Another nice feature in the printer application is the loading screen animation that shows progress. It includes text and a spinning animation.
|
||||
|
||||
![Loading Spinner][18]
|
||||
|
||||
(Edson Holanda Teixeira Jr, [CC BY-SA 4.0][13])
|
||||
|
||||
Implement this feature by adding a timer and a timer listener to update the progress label, then call the function `spinner.start()`. All of the animations are auto-generated by TotalCross and KnowCode:
|
||||
|
||||
|
||||
```
|
||||
public void startSpinner() {
|
||||
time = content.addTimer(500);
|
||||
content.addTimerListener((e) -> {
|
||||
try {
|
||||
progress(); // Updates the Label
|
||||
} catch (InstantiationException | IllegalAccessException e1) {
|
||||
// TODO Auto-generated catch block
|
||||
e1.printStackTrace();
|
||||
}
|
||||
});
|
||||
Spinner spinner = (Spinner) ((XmlContainerLayout) content).getControlByID("@+id/spinner");
|
||||
spinner.start();
|
||||
}
|
||||
```
|
||||
|
||||
The spinner is instantiated as a reference to the `XmlContainerLayout` spinner described in the XML file:
|
||||
|
||||
|
||||
```
|
||||
<ProgressBar
|
||||
android:id="@+id/spinner"
|
||||
android:layout_width="362dp"
|
||||
android:layout_height="358dp"
|
||||
tools:layout_editor_absoluteX="296dp"
|
||||
tools:layout_editor_absoluteY="198dp"
|
||||
android:indeterminateTint="#2B05C7"
|
||||
style="?android:attr/progressBarStyle" />
|
||||
```
|
||||
|
||||
#### 6\. Build the application
|
||||
|
||||
It's time to build the application. You can see and change the target systems in `pom.xml`. Make sure the **Linux Arm** target is available.
|
||||
|
||||
If you are using VSCode, press **F1** on the keyboard, select **TotalCross: Package** and wait for the package to finish. Then you can see the installation files in the **Target** folder.
|
||||
|
||||
#### 7\. Deploy and run the application on Raspberry Pi
|
||||
|
||||
To deploy the application on a [Raspberry Pi 4][19] with the SSH protocol, press **F1** on the keyboard. Select **TotalCross: Deploy&Run** and provide information about your SSH connection: User, IP, Password, and Application Path.
|
||||
|
||||
![TotalCross: Deploy&Run][20]
|
||||
|
||||
(Edson Holanda Teixeira Jr, [CC BY-SA 4.0][13])
|
||||
|
||||
![SSH user][21]
|
||||
|
||||
(Edson Holanda Teixeira Jr, [CC BY-SA 4.0][13])
|
||||
|
||||
![IP address][22]
|
||||
|
||||
(Edson Holanda Teixeira Jr, [CC BY-SA 4.0][13])
|
||||
|
||||
![Password][23]
|
||||
|
||||
(Edson Holanda Teixeira Jr, [CC BY-SA 4.0][13])
|
||||
|
||||
![Path][24]
|
||||
|
||||
(Edson Holanda Teixeira Jr, [CC BY-SA 4.0][13])
|
||||
|
||||
Here's what the application looks like running on the machine.
|
||||
|
||||
### What's next?
|
||||
|
||||
KnowCode makes it easier to create and manage your application screens using Java. Knowcode-XML translates your XML into a TotalCross GUI that in turn generates the binary to run on your Raspberry Pi.
|
||||
|
||||
Combining KnowCode technology with TotalCross enables you to create embedded applications faster. Find out what else you can do by accessing our [embedded samples][25] on GitHub and editing your own application.
|
||||
|
||||
If you have questions, need help, or just want to interact with other embedded GUI developers, feel free to join our [Telegram][26] group to discuss embedded applications on any framework.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/21/3/raspberry-pi-totalcross
|
||||
|
||||
作者:[Edson Holanda Teixeira Junior][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/edsonhtj
|
||||
[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/article/20/7/totalcross-cross-platform-development
|
||||
[3]: https://github.com/TotalCross/knowcode-xml
|
||||
[4]: https://code.visualstudio.com/
|
||||
[5]: https://opensource.com/article/20/6/open-source-alternatives-vs-code
|
||||
[6]: https://developer.android.com/studio
|
||||
[7]: https://marketplace.visualstudio.com/items?itemName=totalcross.vscode-totalcross
|
||||
[8]: https://opensource.com/article/19/11/install-java-linux
|
||||
[9]: https://opensource.com/article/20/7/install-java-mac
|
||||
[10]: http://adoptopenjdk.net
|
||||
[11]: https://opensource.com/life/16/7/stumbling-git
|
||||
[12]: https://opensource.com/sites/default/files/uploads/01_printergui.png (printer init screen)
|
||||
[13]: https://creativecommons.org/licenses/by-sa/4.0/
|
||||
[14]: https://github.com/TotalCross/embedded-samples/tree/main/printer-application/src/main/resources/layout
|
||||
[15]: https://totalcross.com/get-started/?utm_source=opensource&utm_medium=article&utm_campaign=printer
|
||||
[16]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+instantiationexception
|
||||
[17]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+illegalaccessexception
|
||||
[18]: https://opensource.com/sites/default/files/uploads/03progressspinner.png (Loading Spinner)
|
||||
[19]: https://www.raspberrypi.org/products/raspberry-pi-4-model-b/
|
||||
[20]: https://opensource.com/sites/default/files/uploads/04_totalcross-deployrun.png (TotalCross: Deploy&Run)
|
||||
[21]: https://opensource.com/sites/default/files/uploads/05_ssh.png (SSH user)
|
||||
[22]: https://opensource.com/sites/default/files/uploads/06_ip.png (IP address)
|
||||
[23]: https://opensource.com/sites/default/files/uploads/07_password.png (Password)
|
||||
[24]: https://opensource.com/sites/default/files/uploads/08_path.png (Path)
|
||||
[25]: https://github.com/TotalCross/embedded-samples
|
||||
[26]: https://t.me/totalcrosscommunity
|
@ -0,0 +1,284 @@
|
||||
[#]: subject: (Manage containers on Raspberry Pi with this open source tool)
|
||||
[#]: via: (https://opensource.com/article/21/3/bastille-raspberry-pi)
|
||||
[#]: author: (Peter Czanik https://opensource.com/users/czanik)
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
||||
Manage containers on Raspberry Pi with this open source tool
|
||||
======
|
||||
Create and maintain your containers (aka jails) at scale on FreeBSD with
|
||||
Bastille.
|
||||
![Parts, modules, containers for software][1]
|
||||
|
||||
Containers became widely popular because of Docker on Linux, but there are [much earlier implementations][2], including the [jail][3] system on FreeBSD. A container is called a "jail" in FreeBSD terminology. The jail system was first released in FreeBSD 4.0 way back in 2000, and it has continuously improved since. While 20 years ago it was used mostly on large servers, now you can run it on your Raspberry Pi.
|
||||
|
||||
### Jails vs. containers on Linux
|
||||
|
||||
Container development took a very different path on FreeBSD than on Linux. On FreeBSD, containerization was developed as a strict security feature in the late '90s for virtual hosting and its flexibility grew over the years. Limiting a container's computing resources was not part of the original concept; this was added later.
|
||||
|
||||
When I started to use jails in production in 2001, it was quite painful. I had to prepare my own scripts to automate working with them.
|
||||
|
||||
On the Linux side, there were quite a few attempts at containerization, including [lxc][4].
|
||||
|
||||
Docker brought popularity, accessibility, and ease of use to containers. There are now many other tools on Linux (for example, I prefer to use [Podman on my laptop][5]). And Kubernetes allows you to work with containers at really large scale.
|
||||
|
||||
[Bastille][6] is one of several tools available in [FreeBSD ports][7] to manage jails. It is comparable to Docker or Podman and allows you to create and maintain jails at scale instead of manually. It has a template system to automatically install and configure applications within jails, similar to Dockerfile. It also supports advanced FreeBSD functionality, like ZFS or VNET.
|
||||
|
||||
### Install FreeBSD on Raspberry Pi
|
||||
|
||||
Installing [BSD on Raspberry Pi][8] is pretty similar to installing Linux. You download a compressed image from the FreeBSD website and `dd` it to an SD card. You can also use a dedicated image writer tool; there are many available for all operating systems (OS). Download and write an image from the command line with:
|
||||
|
||||
|
||||
```
|
||||
wget <https://download.freebsd.org/ftp/releases/arm64/aarch64/ISO-IMAGES/13.0/FreeBSD-13.0-BETA1-arm64-aarch64-RPI.img.xz>
|
||||
xzcat FreeBSD-13.0-BETA1-arm64-aarch64-RPI.img.xz | dd of=/dev/XXX
|
||||
```
|
||||
|
||||
That writes the latest beta image available for 64-bit Raspberry Pi boards; check the [download page][9] if you use another Raspberry Pi board or want to use another build. Replace `XXX` with your SD card's device name, which depends on your OS and how the card connects to your machine. I purposefully did not use a device name so that you won't overwrite anything if you just copy and paste the instructions mindlessly. I did that and was lucky to have a recent backup of my laptop, but it was _not_ a pleasant experience.
|
||||
|
||||
Once you've written the SD card, put it in your Raspberry Pi and boot it. The first boot takes a bit longer than usual; I suspect the partition sizes are being adjusted to the SD card's size. After a while, you will receive the familiar login prompt on a good old text-based screen. The username is **root**, and the password is the same as the user name. The SSH server is enabled by default, but don't worry; the root user cannot log in. It is still a good idea to change the password to something else. The network is automatically configured by DHCP for the Ethernet connection (I did not test WiFi).
|
||||
|
||||
The easiest way to configure Bastille on the system is to SSH into Raspberry Pi and copy and paste the commands and configuration in this article. You have a couple of options, depending on how much you care about industry best practices or are willing to treat it as a test system. You can either enable root login in the SSHD configuration (scary, but this is what I did at first) or create a regular user that can log in remotely. In the latter case, make sure that the user is part of the "wheel" group so that it can use `su -` to become root and use Bastille:
|
||||
|
||||
|
||||
```
|
||||
root@generic:~ # adduser
|
||||
Username: czanik
|
||||
Full name: Peter Czanik
|
||||
Uid (Leave empty for default):
|
||||
Login group [czanik]:
|
||||
Login group is czanik. Invite czanik into other groups? []: wheel
|
||||
Login class [default]:
|
||||
Shell (sh csh tcsh bash rbash git-shell nologin) [sh]: bash
|
||||
Home directory [/home/czanik]:
|
||||
Home directory permissions (Leave empty for default):
|
||||
Use password-based authentication? [yes]:
|
||||
Use an empty password? (yes/no) [no]:
|
||||
Use a random password? (yes/no) [no]:
|
||||
Enter password:
|
||||
Enter password again:
|
||||
Lock out the account after creation? [no]:
|
||||
Username : czanik
|
||||
Password : *****
|
||||
Full Name : Peter Czanik
|
||||
Uid : 1002
|
||||
Class :
|
||||
Groups : czanik wheel
|
||||
Home : /home/czanik
|
||||
Home Mode :
|
||||
Shell : /usr/local/bin/bash
|
||||
Locked : no
|
||||
OK? (yes/no): yes
|
||||
adduser: INFO: Successfully added (czanik) to the user database.
|
||||
Add another user? (yes/no): no
|
||||
Goodbye!
|
||||
```
|
||||
|
||||
The fifth line adds the user to the wheel group. Note that you might have a different list of shells on your system, and Bash is not part of the base system. Install Bash before adding the user:
|
||||
|
||||
|
||||
```
|
||||
`pkg install bash`
|
||||
```
|
||||
|
||||
PKG needs to bootstrap itself on the first run, so invoking the command takes a bit longer this time.
|
||||
|
||||
### Get started with Bastille
|
||||
|
||||
Managing jails with the tools in the FreeBSD base system is possible—but not really convenient. Using a tool like Bastille can simplify it considerably. It is not part of the base system, so install it:
|
||||
|
||||
|
||||
```
|
||||
`pkg install bastille`
|
||||
```
|
||||
|
||||
As you can see from the command's output, Bastille has no external dependencies. It is a shell script that relies on commands in the FreeBSD base system (with an exception I'll note later when explaining templates).
|
||||
|
||||
If you want to start your containers on boot, enable Bastille:
|
||||
|
||||
|
||||
```
|
||||
`sysrc bastille_enable="YES"`
|
||||
```
|
||||
|
||||
Start with a simple use case. Many people use containers to install different development tools in different containers to avoid conflicts or simplify their environments. For example, no sane person wants to install Python 2 on a brand-new system—but you might need to run an ancient script every once in a while. So, create a jail for Python 2.
|
||||
|
||||
Before creating your first jail, you need to bootstrap a FreeBSD release and configure networking. Just make sure that you bootstrap the same or an older release than the host is running. For example:
|
||||
|
||||
|
||||
```
|
||||
`bastille bootstrap 12.2-RELEASE`
|
||||
```
|
||||
|
||||
It downloads and extracts this release under the `/usr/local/bastille` directory structure.
|
||||
|
||||
Networking can be configured in many different ways using Bastille. One option that works everywhere—on your local machine and in the cloud—is using cloned interfaces. This allows jails to use an internal network that does not interfere with the external network. Configure and start this internal network:
|
||||
|
||||
|
||||
```
|
||||
sysrc cloned_interfaces+=lo1
|
||||
sysrc ifconfig_lo1_name="bastille0"
|
||||
service netif cloneup
|
||||
```
|
||||
|
||||
With this network setup, services in your jails are not accessible from the outside network, nor can they reach outside. You need forward ports from your host's external interface to the jails and to enable network access translation (NAT). Bastille integrates with BSD's [PF firewall][10] for this task. The following `pf.conf` configures the PF firewall such that Bastille can add port forwarding rules to the firewall dynamically:
|
||||
|
||||
|
||||
```
|
||||
ext_if="ue0"
|
||||
|
||||
set block-policy return
|
||||
scrub in on $ext_if all fragment reassemble
|
||||
set skip on lo
|
||||
|
||||
table <jails> persist
|
||||
nat on $ext_if from <jails> to any -> ($ext_if)
|
||||
|
||||
rdr-anchor "rdr/*"
|
||||
|
||||
block in all
|
||||
pass out quick modulate state
|
||||
antispoof for $ext_if inet
|
||||
pass in inet proto tcp from any to any port ssh flags S/SA modulate state
|
||||
```
|
||||
|
||||
You also need to enable and start PF for these rules to take effect. Note that if you work through an SSH connection, starting PF will terminate your connection, and you will need to log in again:
|
||||
|
||||
|
||||
```
|
||||
sysrc pf_enable="YES"
|
||||
service pf restart
|
||||
```
|
||||
|
||||
### Create your first jail
|
||||
|
||||
To create a jail, Bastille needs a few parameters. First, it needs a name for the jail you're creating. It is an important parameter, as you will always refer to a jail by its name. I chose the name of the most famous Hungarian jail for the most elite criminals, but in real life, jail names often refer to the jail's function, like `syslogserver`. You also need to set the FreeBSD release you're using and an internet protocol (IP) address. I used a random `10.0.0.0/8` IP address range, but if your internal network already uses addresses from that, then using the `192.168.0.0/16` is probably a better idea:
|
||||
|
||||
|
||||
```
|
||||
`bastille create csillag 12.2-RELEASE 10.17.89.51`
|
||||
```
|
||||
|
||||
Your new jail should be up and running within a few seconds. It is a complete FreeBSD base system without any extra packages. So install some packages, like my favorite text editor, inside the jail:
|
||||
|
||||
|
||||
```
|
||||
root@generic:~ # bastille pkg csillag install joe
|
||||
[csillag]:
|
||||
Updating FreeBSD repository catalogue...
|
||||
FreeBSD repository is up to date.
|
||||
All repositories are up to date.
|
||||
The following 1 package(s) will be affected (of 0 checked):
|
||||
|
||||
New packages to be INSTALLED:
|
||||
joe: 4.6,1
|
||||
|
||||
Number of packages to be installed: 1
|
||||
|
||||
The process will require 2 MiB more space.
|
||||
442 KiB to be downloaded.
|
||||
|
||||
Proceed with this action? [y/N]: y
|
||||
[csillag] [1/1] Fetching joe-4.6,1.txz: 100% 442 KiB 452.5kB/s 00:01
|
||||
Checking integrity... done (0 conflicting)
|
||||
[csillag] [1/1] Installing joe-4.6,1...
|
||||
[csillag] [1/1] Extracting joe-4.6,1: 100%
|
||||
```
|
||||
|
||||
You can install multiple packages at the same time. Install Python 2, Bash, and Git:
|
||||
|
||||
|
||||
```
|
||||
`bastille pkg csillag install bash python2 git`
|
||||
```
|
||||
|
||||
Now you can start working in your new, freshly created jail. There are no network services installed in it, but you can reach it through its console:
|
||||
|
||||
|
||||
```
|
||||
root@generic:~ # bastille console csillag
|
||||
[csillag]:
|
||||
root@csillag:~ # python2
|
||||
Python 2.7.18 (default, Feb 2 2021, 01:53:44)
|
||||
[GCC FreeBSD Clang 10.0.1 ([git@github.com][11]:llvm/llvm-project.git llvmorg-10.0.1- on freebsd12
|
||||
Type "help", "copyright", "credits" or "license" for more information.
|
||||
>>>
|
||||
root@csillag:~ # logout
|
||||
|
||||
root@generic:~ #
|
||||
```
|
||||
|
||||
### Work with templates
|
||||
|
||||
The previous example manually installed some packages inside a jail. Setting up jails manually is no fun, even if Bastille makes it easy. Templates make the process even easier; they are similar to Dockerfiles but not entirely the same concept. You bootstrap templates for Bastille just like FreeBSD releases and then apply them to jails. When you apply a template, it will install the necessary packages and change configurations as needed.
|
||||
|
||||
To use templates, you need to install Git on the host:
|
||||
|
||||
|
||||
```
|
||||
`pkg install git`
|
||||
```
|
||||
|
||||
For example, to bootstrap the `syslog-ng` template, use:
|
||||
|
||||
|
||||
```
|
||||
`bastille bootstrap https://gitlab.com/BastilleBSD-Templates/syslog-ng`
|
||||
```
|
||||
|
||||
Create a new jail, apply the template, and redirect an external port to it:
|
||||
|
||||
|
||||
```
|
||||
bastille create alcatraz 12.2-RELEASE 10.17.89.50
|
||||
bastille template alcatraz BastilleBSD-Templates/syslog-ng
|
||||
bastille rdr alcatraz tcp 514 514
|
||||
```
|
||||
|
||||
To test the new service within the jail, use telnet to connect port 514 of your host and enter some random text. Use the `tail` command within your jail to see what you just entered:
|
||||
|
||||
|
||||
```
|
||||
root@generic:~ # tail /usr/local/bastille/jails/alcatraz/root/var/log/messages
|
||||
Feb 6 03:57:27 alcatraz sendmail[3594]: gethostbyaddr(10.17.89.50) failed: 1
|
||||
Feb 6 04:07:13 alcatraz syslog-ng[1186]: Syslog connection accepted; fd='23', client='AF_INET(192.168.1.126:50104)', local='AF_INET(0.0.0.0:514)'
|
||||
Feb 6 04:07:18 192.168.1.126 this is a test
|
||||
Feb 6 04:07:20 alcatraz syslog-ng[1186]: Syslog connection closed; fd='23', client='AF_INET(192.168.1.126:50104)', local='AF_INET(0.0.0.0:514)'
|
||||
```
|
||||
|
||||
Since I'm a [syslog-ng][12] evangelist, I used the syslog-ng template in my example, but there are many more available. Check the full list of [Bastille templates][13] to learn about them.
|
||||
|
||||
### What's next?
|
||||
|
||||
I hope that this article inspires you to try FreeBSD and Bastille on your Raspberry Pi. It was just enough information to get you started; to learn about all of Bastille's cool features—like auditing your jails for vulnerabilities and updating software within them—in the [documentation][14].
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/21/3/bastille-raspberry-pi
|
||||
|
||||
作者:[Peter Czanik][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/czanik
|
||||
[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/article/18/1/history-low-level-container-runtimes
|
||||
[3]: https://docs.freebsd.org/en/books/handbook/jails/
|
||||
[4]: https://opensource.com/article/18/11/behind-scenes-linux-containers
|
||||
[5]: https://opensource.com/article/18/10/podman-more-secure-way-run-containers
|
||||
[6]: https://bastillebsd.org/
|
||||
[7]: https://www.freebsd.org/ports/
|
||||
[8]: https://opensource.com/article/19/3/netbsd-raspberry-pi
|
||||
[9]: https://www.freebsd.org/where/
|
||||
[10]: https://en.wikipedia.org/wiki/PF_(firewall)
|
||||
[11]: mailto:git@github.com
|
||||
[12]: https://www.syslog-ng.com/
|
||||
[13]: https://gitlab.com/BastilleBSD-Templates/
|
||||
[14]: https://bastille.readthedocs.io/en/latest/
|
@ -0,0 +1,201 @@
|
||||
[#]: subject: (How to Install Nvidia Drivers on Linux Mint [Beginner’s Guide])
|
||||
[#]: via: (https://itsfoss.com/nvidia-linux-mint/)
|
||||
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
||||
How to Install Nvidia Drivers on Linux Mint [Beginner’s Guide]
|
||||
======
|
||||
|
||||
[Linux Mint][1] is a fantastic Ubuntu-based Linux distribution that aims to make it easy for newbies to experience Linux by minimizing the learning curve.
|
||||
|
||||
Not just limited to being one of the [best beginner-friendly Linux distros][2], it also does a [few things better than Ubuntu][3]. Of course, if you’re using Linux Mint like I do, you’re probably already aware of it.
|
||||
|
||||
We have many beginner-focused Mint tutorials on It’s FOSS. Recently some readers requested help with Nvidia drivers with Linux Mint and hence I came up with this article.
|
||||
|
||||
I have tried to mention different methods with a bit of explaining what’s going on and what you are doing in these steps.
|
||||
|
||||
But before that, you should know this:
|
||||
|
||||
* Nvidia has two categories of drivers. Open source drivers called Nouveau and proprietary drivers from Nvidia itself.
|
||||
* Most of the time, Linux distributions install the open source Nouveau driver and you can manually enable the proprietary drivers.
|
||||
* Graphics drivers are tricky things. For some systems, Nouveau works pretty well while for some it could create issues like blank screen or poor display. You may switch to proprietary drivers in such cases.
|
||||
* The proprietary driver from Nvidia has different version numbers like 390, 450, 460. The higher the number, the more recent is the driver. I’ll show you how to change between them in this tutorial.
|
||||
* If you are opting for proprietary drivers, you should go with the latest one unless you encounter some graphics issue. In those cases, opt for an older version of the driver and see if that works fine for you.
|
||||
|
||||
|
||||
|
||||
Now that you have some familiarity with the terms, let’s see how to go about installing Nvidia drivers on Linux Mint.
|
||||
|
||||
### How to Install Nvidia Drivers on Linux Mint: The Easy Way (Recommended)
|
||||
|
||||
Linux Mint comes baked in with a [Driver Manager][4] which easily lets you choose/install a driver that you need for your hardware using the GUI.
|
||||
|
||||
By default, you should see the open-source [xserver-xorg-video-nouveau][5] driver for Nvidia cards installed, and it works pretty well until you start playing a high-res video or want to play a [game on Linux][6].
|
||||
|
||||
So, to get the best possible experience, proprietary drivers should be preferred.
|
||||
|
||||
You should get different proprietary driver versions when you launch the Driver Manager as shown in the image below:
|
||||
|
||||
![][7]
|
||||
|
||||
Basically, the higher the number, the latest driver it is. At the time of writing this article, driver **version 460** was the latest recommendation for my Graphics Card. You just need to select the driver version and hit “**Apply Changes**“.
|
||||
|
||||
Once done, all you need to do is just reboot your system and if the driver works, you should automatically get the best resolution image and the refresh rate depending on your monitor for the display.
|
||||
|
||||
For instance, here’s how it looks for me (while it does not detect the correct size of the monitor):
|
||||
|
||||
![][8]
|
||||
|
||||
#### Troubleshooting tips
|
||||
|
||||
Depending on your card, the list would appear to be different. So, **what driver version should you choose?** Here are some pointers for you:
|
||||
|
||||
* The latest drivers should ensure compatibility with the latest games and should technically offer better performance overall. Hence, it is the recommended solution.
|
||||
* If the latest driver causes issues or fails to work, choose the next best offering. For instance, version 460 didn’t work, so I tried applying driver version 450, and it worked!
|
||||
|
||||
|
||||
|
||||
Initially, in my case (**Linux Mint 20.1** with **Linux Kernel 5.4**), the latest driver 460 version did not work. Technically, it was successfully installed but did not load up every time I booted.
|
||||
|
||||
**What to do if drivers fail to load at boot**
|
||||
|
||||
_How do you know when it does not work?_ You will boot up with a low-resolution screen, and you will be unable to tweak the resolution or the refresh rate of the monitor.
|
||||
|
||||
It will also inform you about the same in the form of an error:
|
||||
|
||||
![][9]
|
||||
|
||||
Fortunately, a solution from [Linux Mint’s forum][10] solved it for me. Here’s what you need to do:
|
||||
|
||||
1\. Access the modules file using the command:
|
||||
|
||||
```
|
||||
xed admin:///etc/modules
|
||||
```
|
||||
|
||||
2\. You’ll be prompted to authenticate the access with your account password. Once done, you just need to add the following lines at the bottom:
|
||||
|
||||
```
|
||||
nvidia
|
||||
nvidia-drm
|
||||
nvidia-modeset
|
||||
```
|
||||
|
||||
Here’s what it looks like:
|
||||
|
||||
![][11]
|
||||
|
||||
If that doesn’t work, you can launch the Driver Manager and opt for another version of Nvidia driver. It’s more of a hit and try.
|
||||
|
||||
### Install Nvidia Driver Using the Terminal (Special Use-Cases)
|
||||
|
||||
For some reasons, if you are not getting the latest drivers for your Graphics Card using the Driver Manager, opting for the terminal method could help.
|
||||
|
||||
It may not be the safest way to do it, but I did not have any issues installing the latest Nvidia driver 460 version.
|
||||
|
||||
I’ll always recommend sticking to the Driver Manager app unless you have your reasons.
|
||||
|
||||
To get started, first you have to check the available drivers for your GPU. Type in the following command to get the list:
|
||||
|
||||
```
|
||||
ubuntu-drivers devices
|
||||
```
|
||||
|
||||
Here’s how it looks in my case:
|
||||
|
||||
![][12]
|
||||
|
||||
**non-free** refers to the proprietary drivers and **free** points at the open-source nouveau Nvidia drivers.
|
||||
|
||||
As mentioned above, usually, it is preferred to try installing the recommended driver. In order to do that, you just type in:
|
||||
|
||||
```
|
||||
sudo ubuntu-drivers autoinstall
|
||||
```
|
||||
|
||||
If you want something specific, type in:
|
||||
|
||||
```
|
||||
sudo apt install nvidia-driver-450
|
||||
```
|
||||
|
||||
You just have to replace “**450**” with the driver version that you want and it will install the driver in the same way that you install an application via the terminal.
|
||||
|
||||
Once installed, you just need to restart the system or type it in the terminal:
|
||||
|
||||
```
|
||||
reboot
|
||||
```
|
||||
|
||||
**To check the Nvidia driver version and verify the installation, you can type the following command in the terminal:**
|
||||
|
||||
```
|
||||
nvidia-smi
|
||||
```
|
||||
|
||||
Here’s how it may look like:
|
||||
|
||||
![][13]
|
||||
|
||||
To remove the driver and its associated dependencies, simply mention the exact version of the driver:
|
||||
|
||||
```
|
||||
sudo apt remove nvidia-driver-450
|
||||
sudo apt autoremove
|
||||
```
|
||||
|
||||
And, simply reboot. It should fallback to use the open-source nouveau driver.
|
||||
|
||||
install the open-source driver using the following command and then reboot to revert to the default open-source driver:
|
||||
|
||||
```
|
||||
sudo apt install xserver-xorg-video-nouveau
|
||||
```
|
||||
|
||||
### Installing Nvidia Drivers using the .run file from Official Website (Time Consuming/Not Recommended)
|
||||
|
||||
Unless you want the latest version of the driver from the official website or just want to experiment the process, you can opt to download the file (.run) and install it.
|
||||
|
||||
To proceed, you need to first disable the X server and then install the Nvidia driver which could turn out to be troublesome and risky.
|
||||
|
||||
You can follow the [official documentation][14] if you want to explore this method, but you may not need it at all.
|
||||
|
||||
### Wrapping Up
|
||||
|
||||
While it’s easy to install Nvidia drivers in Linux Mint, occasionally, you might find something that does not work for your hardware.
|
||||
|
||||
If one driver version does not work, I’d suggest you to try other available versions for your Graphics Card and stick to the one that works. Unless you’re gaming and want the latest software/hardware compatibility, you don’t really need the latest Nvidia drivers installed.
|
||||
|
||||
Feel free to share your experiences with installing Nvidia drivers on Linux Mint in the comments down below.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/nvidia-linux-mint/
|
||||
|
||||
作者:[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://linuxmint.com/
|
||||
[2]: https://itsfoss.com/best-linux-beginners/
|
||||
[3]: https://itsfoss.com/linux-mint-vs-ubuntu/
|
||||
[4]: https://github.com/linuxmint/mintdrivers
|
||||
[5]: https://nouveau.freedesktop.org/
|
||||
[6]: https://itsfoss.com/linux-gaming-guide/
|
||||
[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/03/linux-mint-driver-manager.jpg?resize=800%2C548&ssl=1
|
||||
[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/03/linux-mint-display-settings.jpg?resize=800%2C566&ssl=1
|
||||
[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/03/linux-mint-no-driver.jpg?resize=593%2C299&ssl=1
|
||||
[10]: https://forums.linuxmint.com/viewtopic.php?p=1895521#p1895521
|
||||
[11]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/03/etc-modules-nvidia.jpg?resize=800%2C587&ssl=1
|
||||
[12]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/03/linux-mint-device-drivers-list.jpg?resize=800%2C506&ssl=1
|
||||
[13]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/03/nvidia-smi.jpg?resize=800%2C556&ssl=1
|
||||
[14]: https://download.nvidia.com/XFree86/Linux-x86_64/440.82/README/installdriver.html
|
@ -1,98 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (robsean)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Run your favorite Windows applications on Linux)
|
||||
[#]: via: (https://opensource.com/article/21/2/linux-wine)
|
||||
[#]: author: (Seth Kenlon https://opensource.com/users/seth)
|
||||
|
||||
在 Linux 上运行你最喜欢的 Windows 应用程序
|
||||
======
|
||||
WINE 是一个开放源文件的项目,它协助很多 Windows 应用程序在 Linux 上运行,就好像它们是本地程序一样。
|
||||
![打开文件或窗口的计算机屏幕][1]
|
||||
|
||||
在 2021 年,有很多人们比为什么以往更喜欢 Linux 的原因。在这系列中,我将分享使用 Linux 的 21 种的不同原因。这里是如何使用 WINE 来实现从 Windows 到 Linux 的无缝切换。
|
||||
|
||||
你有仅在 Windows 上运行的应用程序吗?是这个应用程序的事情阻碍你切换到 Linux 吗?如果是这样的话,你将会很高兴知道 WINE, 一个开放源文件工程,几乎彻底改造了关键的 Windows 库,以便为 Windows 编译的应用程序可以在 Linux 上运行。
|
||||
|
||||
WINE 代表着 "Wine Is Not an Emulator" ,它引用驱动这项技术的代码。开放源文件开发者从 1993 年开始致力将应用程序任何传入的 Windows API调用翻译为 [POSIX][2] 调用。
|
||||
|
||||
这是一个令人十分惊讶的编程壮举,尤其是考虑到这个项目是独立运行的,没有来自 Microsoft (客观的说)的帮助,但是这里有局限性。一个应用程序偏离 Windows API 的 “内核” 越远,WINE 就越不能预期应用程序的请求。这里有一些供应商可以弥补这一点,尤其是 [Codeweavers][3] 和 [Valve Software][4]。在需要翻译应用程序的制作者和制作翻译的人们和公司之间没有协调配合,因此,在两者之间可能会有一些时间上的滞后,例如,一个更新的软件标题和当它从 [WINE 总部][5] 获得“黄金”身份时。
|
||||
|
||||
然而,如果你想在 Linux 上运行一个著名的 Windows 应用程序,WINE 可能已经为它准备好了可能性。
|
||||
|
||||
### 安装 WINE
|
||||
|
||||
你可以从你的 Linux 发行版的软件包存储库中安装 WINE 。在 Fedora ,CentOS Stream ,或 RHEL 系统上:
|
||||
|
||||
|
||||
```
|
||||
`$ sudo dnf install wine`
|
||||
```
|
||||
|
||||
在 Debian ,Linux Mint ,Elementary 及相似的系统上:
|
||||
|
||||
|
||||
```
|
||||
`$ sudo apt install wine`
|
||||
```
|
||||
|
||||
WINE 不是一个你启动它本身的应用程序。当启动一个 Windows 应用程序时,它是一个被调用的后端。你与 WINE 的第一次交互很可能就发生在你启动一个 Windows 应用程序的安装程序。
|
||||
|
||||
### 安装一个应用程序
|
||||
|
||||
[TinyCAD][6] 是一个极好的用于设计电路的开放源文件的应用程序,但是它仅在 Windows 上可用。虽然它是一个小型的应用程序,但是它确实包含一些 .NET 组件,因此应该能对 WINE 进行一些压力测试。
|
||||
|
||||
首先,下载 TinyCAD 的安装程序。Windows 安装程序通常都是这样,它是一个 `.exe` 文件。在下载后,双击文件来启动它。
|
||||
|
||||
![WINE TinyCAD 安装向导][7]
|
||||
|
||||
针对 TinyCAD 的 WINE 安装向导
|
||||
|
||||
像你在 Windows 上一样逐步a完成安装程序。通常最好接受默认选项,尤其是与 WINE 有关的地方。WINE 环境基本上是独立的,隐藏在你的硬盘驱动器上的一个 **drive_c** 目录中,作为Windows 应用程序使用的一个文件系统的仿真根目录。
|
||||
|
||||
![WINE TinyCAD 安装和明白驱动器][8]
|
||||
|
||||
WINE TinyCAD 目标驱动器
|
||||
|
||||
在它安装后,应用程序通常会为你提供启动器。如果你正准备测试一下它的话,启动应用程序。
|
||||
|
||||
### 启动一个 Windows 应用程序
|
||||
|
||||
除了在安装后的第一次启动外,在正常情况下,你启动一个 WINE 应用程序的方式与你启动一个本地 Linux 应用程序相同。不管你使用一个应用程序菜单或一个 Activities 屏幕或者只是在一个运行器中输入应用程序的名称,在 WINE 中运行的桌面 Windows 应用程序都会被视为在 Linux 上的本地应用程序。
|
||||
|
||||
![TinyCAD 使用 WINE 运行][9]
|
||||
|
||||
通过 WINE 的支持来运行 TinyCAD
|
||||
|
||||
### 当 WINE 失败时
|
||||
|
||||
我在 WINE 中的大多数应用程序,包括 TinyCAD ,都能如期运行。不过,也会有意外。在这些情况下,你可以静候几个月来查看 WINE 开发者 (或者,如果它是一款游戏,等候 Valve Software) 是否进行追加修补,或者你可以联系一个像or you can contact a vendor like Codeweavers 这样的供应商来查看他们是否出售对你所需要的应用程序的服务支持。
|
||||
|
||||
### WINE 是作弊的,但是它使用了一种很好的方法。
|
||||
|
||||
一些 Linux 用户觉得:如果你使用 WINE 的话,你就是在 Linux 上“作弊”。它可能会让人有这种感觉,但是 WINE 是一个开放源文件的项目,它能够使用户切换到 Linux ,并且仍然能为他们运行工作或爱好所必要的应用程序。如果 WINE 能解决你的问题,并且让你使用 Linux 的话,那么就使用它,并拥抱 Linux 的灵活性。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/21/2/linux-wine
|
||||
|
||||
作者:[Seth Kenlon][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[robsean](https://github.com/robsean)
|
||||
校对:[校对者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/browser_screen_windows_files.png?itok=kLTeQUbY (Computer screen with files or windows open)
|
||||
[2]: https://opensource.com/article/19/7/what-posix-richard-stallman-explains
|
||||
[3]: https://www.codeweavers.com/crossover
|
||||
[4]: https://github.com/ValveSoftware/Proton
|
||||
[5]: http://winehq.org
|
||||
[6]: https://sourceforge.net/projects/tinycad/
|
||||
[7]: https://opensource.com/sites/default/files/wine-tinycad-install.jpg
|
||||
[8]: https://opensource.com/sites/default/files/wine-tinycad-drive_0.jpg
|
||||
[9]: https://opensource.com/sites/default/files/wine-tinycad-running.jpg
|
@ -0,0 +1,104 @@
|
||||
[#]: subject: (You Can Now Install Official Evernote Client on Ubuntu and Debian-based Linux Distributions)
|
||||
[#]: via: (https://itsfoss.com/install-evernote-ubuntu/)
|
||||
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
||||
你现在可以在 Ubuntu 和基于 Debian 的 Linux 发行版上安装官方 Evernote 客户端了
|
||||
======
|
||||
|
||||
[Evernote][1] 是一款流行的笔记应用。它在推出时是一个革命性的产品。从那时起,已经有好几个这样的应用,可以将网络剪报、笔记等保存为笔记本格式。
|
||||
|
||||
多年来,Evernote 的桌面客户端一直没有在 Linux 上使用。前段时间 Evernote 承诺推出 Linux 应用,其测试版终于可以在基于 Ubuntu 的发行版上使用了。
|
||||
|
||||
非 FOSS 警报!
|
||||
|
||||
Evernote Linux 客户端不是开源的。之所以在这里介绍它,是因为该应用是在 Linux 上提供的,我们也会不定期地介绍 Linux 用户常用的非 foss 应用。这对普通桌面 Linux 用户有帮助。
|
||||
|
||||
### 在 Ubuntu 和基于 Debian 的 Linux 发行版上安装 Evernote
|
||||
|
||||
进入下面这个 Evernote 的网站页面:
|
||||
|
||||
[Evernote Linux Beta Program][2]
|
||||
|
||||
向下滚动一点,接受“早期测试计划”的条款和条件。你会看到一个“立即安装”的按钮出现在屏幕上。点击它来下载 DEB 文件。
|
||||
|
||||
![][3]
|
||||
|
||||
要[从 DEB 文件安装应用][4],请双击它。它应该会打开软件中心,并给你选择安装它。
|
||||
|
||||
![][5]
|
||||
|
||||
安装完成后,在系统菜单中搜索 Evernote 并启动它。
|
||||
|
||||
![][6]
|
||||
|
||||
当你第一次启动应用时,你需要登录到你的 Evernote 账户。
|
||||
|
||||
![][7]
|
||||
|
||||
第一次运行会带你进入“主页面”,在这里你可以整理你的笔记本,以便更快速地访问。
|
||||
|
||||
![][8]
|
||||
|
||||
你现在可以享受在 Linux 上使用 Evernote 了。
|
||||
|
||||
### 体验 Evernote 的 Linux 测试版客户端
|
||||
|
||||
由于软件处于测试版,因此这里或那里会有些问题。
|
||||
|
||||
如上图所示,Evernote Linux 客户端检测到 [Ubuntu 中的深色模式][9]并自动切换到深色主题。然而,当我把系统主题改为浅色或标准主题时,它并没有立即改变应用主题。这些变化是在我重启 Evernote 应用后才生效的。
|
||||
|
||||
另一个问题是关于关闭应用。如果你点击 X 按钮关闭 Evernote,程序会进入后台而不是退出。
|
||||
|
||||
有一个应用指示器,似乎可以启动最小化的 Evernote,就像 [Linux 上的 Skype][10]。不幸的是,事实并非如此。它打开了便笺,让你快速输入笔记。
|
||||
|
||||
这为你提供了另一个 [Linux 上的笔记应用][11],但它也带来了一个问题。这里没有退出 Evernote 的选项。它只用于打开快速记事应用。
|
||||
|
||||
![][12]
|
||||
|
||||
那么,如何退出 Evernote 应用呢?为此,再次打开 Evernote 应用。如果它在后台运行,在菜单中搜索它,并启动它,就像你重新打开它一样。
|
||||
|
||||
当 Evernote 应用在前台运行时,点击 File->Quit 退出 Evernote。
|
||||
|
||||
![][13]
|
||||
|
||||
这一点开发者应该在未来的版本中寻求改进。
|
||||
|
||||
我也不能说测试版的程序将来会如何更新。它没有添加任何仓库。我只是希望程序本身能够通知用户有新的版本,这样用户就可以下载新的 DEB 文件。
|
||||
|
||||
我并没有订阅 Evernote Premium,但我仍然可以在没有网络连接的情况下访问保存的网络文章和笔记。很奇怪,对吧?
|
||||
|
||||
总的来说,我很高兴看到 Evernote 终于努力把这个应用带到了 Linux 上。现在,你不必再尝试第三方应用来在 Linux 上使用 Evernote 了,至少在 Ubuntu 和基于 Debian 的发行版上是这样。当然,你可以使用 [Evernote 替代品][14],比如 [Joplin][15],它们都是开源的。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/install-evernote-ubuntu/
|
||||
|
||||
作者:[Abhishek Prakash][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://itsfoss.com/author/abhishek/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://evernote.com/
|
||||
[2]: https://evernote.com/intl/en/b1433t1422
|
||||
[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/03/evernote-early-access-linux.png?resize=799%2C495&ssl=1
|
||||
[4]: https://itsfoss.com/install-deb-files-ubuntu/
|
||||
[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/03/install-evernote-linux.png?resize=800%2C539&ssl=1
|
||||
[6]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/03/evernote-ubuntu.jpg?resize=800%2C230&ssl=1
|
||||
[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/03/evernote-running-ubuntu.png?resize=800%2C505&ssl=1
|
||||
[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/03/evernote-on-ubuntu.png?resize=800%2C537&ssl=1
|
||||
[9]: https://itsfoss.com/dark-mode-ubuntu/
|
||||
[10]: https://itsfoss.com/install-skype-ubuntu-1404/
|
||||
[11]: https://itsfoss.com/note-taking-apps-linux/
|
||||
[12]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/03/evernote-app-indicator.png?resize=800%2C480&ssl=1
|
||||
[13]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/03/quit-evernote-linux.png?resize=799%2C448&ssl=1
|
||||
[14]: https://itsfoss.com/5-evernote-alternatives-linux/
|
||||
[15]: https://itsfoss.com/joplin/
|
Loading…
Reference in New Issue
Block a user