[i=s] 本帖最后由 bearthur 于 2011-2-22 23:26 编辑 [/i]
我想改下DISPLAY这个环境变量,这样为什么不行:
bearthur@bearthur-Lenovo-G450:~$ export DISPLAY =localhost:0.0
bash: export: “=localhost:0.0”: 无效的标识符
bearthur@bearthur-Lenovo-G450:~$ sudo export DISPLAY=localhost:0.0
[sudo] password for bearthur:
sudo: export: command not found
bearthur@bearthur-Lenovo-G450:~$ export DISPLAY =localhost:0.0
bash: export: “=localhost:0.0”: 无效的标识符
bearthur@bearthur-Lenovo-G450:~$ export DISPLAY =0.0
bash: export: “=0.0”: 无效的标识符
兼职人 于 2011-05-04 18:56:29发表:
路过。
ICEEN 于 2011-05-04 13:04:26发表:
就是这样,字符识别阿
singleym 于 2011-02-26 10:43:39发表:
学习了。受教了~
bearthur 于 2011-02-23 19:21:52发表:
原来这样~懂了~谢谢~
wangyu 于 2011-02-23 17:18:04发表:
没有特殊字符不用加双引号,比如你这个,有冒号和点号,会被认为有特殊的作用,就必须把它括起来,同理,变量里有空格也是一样
miftoe 于 2011-02-23 08:46:22发表:
顶楼主
相思爱文 于 2011-02-23 00:32:57发表:
[i=s] 本帖最后由 相思爱文 于 2011-2-23 00:37 编辑 [/i]
赋值时=两边不要加空格
hcc@debian:~$ echo $DISPLAY
:0.0
hcc@debian:~$ export DISPLAY =localhost:0.0
bash: export: `=localhost:0.0': not a valid identifier
hcc@debian:~$ echo $DISPLAY
:0.0
hcc@debian:~$ export DISPLAY=localhost:0.0
hcc@debian:~$ echo $DISPLAY
localhost:0.0
hcc@debian:~$
相思爱文 于 2011-02-23 00:27:21发表:
把等号左边的空格去掉
bearthur 于 2011-02-22 23:26:23发表:
恩 是这样
看海明工作室的ubuntu视频教程 15_基本命令篇_系统管理
他没加" "怎么可以?真是奇怪~
lykginy 于 2011-02-22 20:56:32发表:
好像看错了
lykginy 于 2011-02-22 20:55:16发表:
你的是中文标点吧
wangyu 于 2011-02-22 18:29:06发表:
export DISPLAY ="localhost:0.0"