linux进程参数,linux 一个程序的启动参数问题?

WINEPREFIX=~/.deepinwine/Deepin-QQ deepin-wine winecfg

这种写法的格式相当于:变量名=变量值 要执行的命令

赋值语句和要执行的命令中间用空格隔开,而不是用分号 ;。

这种格式的写法表示,定义一个变量,且只影响被执行命令的shell环境,不影响当前的shell环境。

具体说明可以查看 GNU bash 的在线帮助链接 http://www.gnu.org/software/b...,第 “3.7.1 Simple Command Expansion” 小节有如下说明:

When a simple command is executed, the shell performs the following expansions, assignments, and redirections, from left to right.

The words that the parser has marked as variable assignments (those preceding the command name) and redirections are saved for later processing.

If no command name results, the variable assignments affect the current shell environment. Otherwise, the variables are added to the environment of the executed command and do not affect the current shell environment.

即,在执行命令时,可以在命令前面加一些变量赋值语句,所定义的变量只影响执行命令的shell。

而 export WINEPREFIX=~/.deepinwine/Deepin-QQ 命令会导出一个全局变量到shell环境里面,且默认会传递给当前 shell 的子 shell。

所以,先执行 export WINEPREFIX=~/.deepinwine/Deepin-QQ,再执行 deepin-wine winecfg 命令,执行wine命令的子 shell 应该是可以获取到 WINEPREFIX 变量的值。

建议执行 export WINEPREFIX=~/.deepinwine/Deepin-QQ 命令后,在当前shell里面执行 export 命令、env 命令看一下 WINEPREFIX 变量的值,看是否已经定义成功。

然后在当前shell里面执行 deepin-wine winecfg 命令再看一下。

补充一下,在 Ubuntu 中文 Wiki 上,介绍 wine 操作技巧时,就有提到可以先 export WINEPREFIX,再执行 wine 命令。

具体可以查看 https://wiki.ubuntu.org.cn/Wi... 这个链接。关键内容如下:

使用不同的.wine目录运行程序

----------------

我们有时不希望所有程序安装于一个.wine中。因为有些程序需要特别的运行环境,或者对.wine的更改比较大(经常需要删除.wine),或者直接影响其它程序运行。

比如我们使用/home/xxx/.no1-wine运行该文件夹中的yyy程序

WINEPREFIX=/home/xxx/.no1-wine wine /home/xxx/.no1-wine/drive\_c/Program\\ Files/yyyy

具体路径大家可以自己设置。WINEPREFIX= 是用于声明路径的

如果是在shell文件中编写命令:

export WINEPREFIX=$HOME/.wine-thunder

wine $WINEPREFIX/drive\_c/Program\\ Files/Thunder/Thunder.exe

是个很好的例子。export是变量声明。

即,先 export WINEPREFIX,再执行 wine 命令,在语法上是可行的。

如果在 deepinwine 上有异常,可能跟 deepinwine 使用 WINEPREFIX 变量的逻辑有关,具体可以再查看 deepinwine 的文档了。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值