我使用ssh连接到Ubuntu中的远程服务器。我想打开文件pdf,html,txt等等。我想用文本编辑器打开它,但是对于请求,例如gnome打开INSTALL_linux.txt,它说:
(gnome-open:16187): GConf-WARNING **: Client failed to connect to the D-BUS daemon:
Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
GConf Error: No D-BUS daemon running
Error showing url: Err
为了使我的Real Studio应用程序可移植,我想让它使用默认的控制台/终端应用程序在Mac、Windows和Linux上打开一个可执行文件。我有一个字符串s,它是可执行文件的文件名。到目前为止,我有这样的想法:
#If TargetMacOS
DIM sh As new Shell
sh.Execute "open " + GetFolderItem(s).ShellPath + " -a Terminal"
#EndIf
但是如何在Windows和Linux上做到这一点呢?对于Linux,我可以用gnome-terminal或konsole打开文件
我现在在我的笔记本电脑上运行Windows,我想从我的笔记本电脑上传文件到我的uni的通用服务器,它同时运行Linux和MacOSX。
因此,我已经使用PuTTy打开了到该服务器的连接。但我未能使用网站中的命令将文件从我的笔记本电脑上传到该服务器。看起来它只适用于Linux to Linux机器。它不能识别我输入的Windows路径(即C:\a.txt)。
我该怎么做呢?
我需要打开一个项目,我认为它是在linux写的或需要linux环境来构建它。我使用的是Win8,我不再熟悉Linux env了。在它的自述文件中,它是这样写成s.th的:
HOW TO INSTALL
> tar xzvf DepOE-beta.tar.gz
> sh install-DepOE.sh
Two NLP tools are installed:
- DepPattern (dependency-based parser)
- Tree-Tagger (PoS tagger)
Pay attention: do not install the package
我正在编写一个python脚本,将输出打印到屏幕(linux shell)中,并且使用彩色打印它。有没有办法知道输出是否进入文件?
示例:
script.py parms
这在shell中给了我很好的彩色输出。
现在,如果我这样做:
script.py parms > output.txt
当我打开文件时,我看到奇怪的ASCII字符(颜色值),我尝试在几个文本编辑器中打开它(凯特,gedit)。
我想做一些类似的事情:
if goesIntoFile:
print in black
else:
print in color
我该怎么做呢?