了解修复 LibreOffice 的 Linux 命令语法

Understanding a Linux Command Syntax that Fixed LibreOffice

问候并原谅冗长的标题,

前言:我解决了一个问题,即在下载 LibreOffice 后,启动画面会出现,但之后没有任何反应

以下是解决我的问题的解决方案: 第 1 步。SAL_DISABLE_OPENCL=1 soffice 步骤 2. 应打开 libre office - 打开工具 -> 选项 -> LibreOffice -> OpenCL 并禁用选项 "Allow use of OpenCL"

也就是说,我试图了解步骤 1 中发生的事情。在我看来,我们正在通过 soffice 命令打开一个子 shell,其中变量 SAL_DISABLE_OPENCL 在所述子外壳的上下文

我以前从未见过或读过这方面的内容,因此放弃了尝试 google 正确的字串。这个概念有名字吗?我试过 soffice --help 但没有任何东西可以表明这种语法

非常感谢任何帮助,谢谢!

运行 SAL_DISABLE_OPENCL=1 soffice 运行 程序 soffice 传递给它的环境变量 SAL_DISABLE_OPENCL 设置为值 1。它不是 运行 子 shell,它是 运行 在你目前的 shell 上。此语法为 described in the bash manual:

The environment for any simple command or function may be augmented temporarily by prefixing it with parameter assignments, as described in Shell Parameters. These assignment statements affect only the environment seen by that command.

该环境变量是 LibreOffice 专门处理的值,用于强制禁用该选项。