Macos emacs外壳模式窗口内的prlctl exec问题
问:有人能告诉我如何在emacs外壳模式缓冲区中运行“prlctl exec”吗 --+emacs外壳模式下的prlctl问题 我有一个Windows虚拟机在Mac上的并行机上运行 我想编写一些在Mac OS-X上运行的shell和Perl脚本 类UNIX环境,在并行机上调用Windows应用程序。 特别是框架制造商 具体地说,我希望能够在emacs中工作,在本机上运行 Mac,然后执行esc-x编译以运行Makefile-said Makefile执行诸如运行FrameMaker ExtendScript命令之类的操作, 在中更新书籍目录之类的操作 FrameMaker,将FrameMaker文件保存为文本或PDF等。基本上, 不幸的是,通常的自动化已经不再那么普遍了 去年我在Windows上使用Cygwin实现了这一切,但我 切换到使用具有并行的Mac prlctl命令似乎就是我运行命令所需要的。 特别是控制台的“prlctl exec”或可能的“prlctl enter” 类型用法 问题:prlctl exec在emacs下的shell模式缓冲区中运行不好 在Mac上 在MacOS终端窗口中,prlctl exec似乎运行正常 但在emacs外壳模式缓冲区中,那么: a) 运行“prlctl enter”可以使用emacs外壳模式缓冲区。 我可以运行DOS命令行类型的命令。但当我退出游戏时 “prlctl enter”会话时,它总是退出控制shell模式缓冲区的shell b) 类似地,“prlctl exec…”等命令也在emacs中运行 shell模式缓冲区,但当exec'ed命令终止时 终止控制shell模式缓冲区的shell c) 如果我试图将prlctl exec置于后台,例如(prlctl exec…&), 事情变得很疯狂。什么看起来像键盘控制代码被发送到 shell控制emacs shell模式缓冲区 我猜想“prlctl”是远程控制Windows命令的 通过某种伪终端拦截。而且一直都是这样 使用交互式MacOS终端窗口进行测试,但不起作用 使用用于emacs外壳模式的伪终端 问:有没有人能让这样的事情奏效 说“只需从Mac终端窗口运行prlctl exec命令 可能是正确的选择,尽管作为一个emacs本地人, 这会很痛苦,但即使在Mac终端窗口上运行, 我在prtlctl上遇到了类似的问题 到目前为止,我还无法通过prlctl启动FrameMaker, 尽管我可以通过.BAT文件或PowerShell轻松启动它 -+emacs外壳缓冲区的prlctl问题示例 --++prlctl enter在mac终端窗口中成功运行Macos emacs外壳模式窗口内的prlctl exec问题,macos,emacs,parallels,Macos,Emacs,Parallels,问:有人能告诉我如何在emacs外壳模式缓冲区中运行“prlctl exec”吗 --+emacs外壳模式下的prlctl问题 我有一个Windows虚拟机在Mac上的并行机上运行 我想编写一些在Mac OS-X上运行的shell和Perl脚本 类UNIX环境,在并行机上调用Windows应用程序。 特别是框架制造商 具体地说,我希望能够在emacs中工作,在本机上运行 Mac,然后执行esc-x编译以运行Makefile-said Makefile执行诸如运行FrameMaker Extend
Andy-Glew-MacBook-Pro:~ glew$ prlctl list
UUID STATUS IP_ADDR NAME
{3b5c5ff5-2909-4a8b-a9e6-a54d909ba98c} running - WinVM
Andy-Glew-MacBook-Pro:~ glew$ prlctl enter WinVM
Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.
C:\>echo hi
echo hi
hi
C:\>exit
exit
Andy-Glew-MacBook-Pro:~ glew$
Andy-Glew-MacBook-Pro:~ glew$
Andy-Glew-MacBook-Pro:~ glew$ prlctl exec WinVM ipconfig | grep localdomain
Connection-specific DNS Suffix . : localdomain
Tunnel adapter isatap.localdomain:
Connection-specific DNS Suffix . : localdomain
Andy-Glew-MacBook-Pro:~ glew$
--++prlctl enter在emacs外壳模式缓冲区中运行
$ bash glew@Andy-Glew-MacBook-Pro [~/hack] c47 h1222 j0 $
$ bash ~/hack $>
$ bash 1222 $> prlctl enter WinVM
Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.
C:\>echo hi
echo hi
hi
C:\>exit
exit
✓ 02:27:14 PM Saturday 2015-10-17
$ bash glew@Andy-Glew-MacBook-Pro [~/hack] c48 h1223 j0 $
$ bash ~/hack $>
$ bash 1223 $> exit
Process shell finished
$ bash 1226 $> prlctl exec WinVM ipconfig | grep local
Connection-specific DNS Suffix . : localdomain
Link-local IPv6 Address . . . . . : fe80::958c:20a3:da02:2903%3
Tunnel adapter isatap.localdomain:
Connection-specific DNS Suffix . : localdomain
Link-local IPv6 Address . . . . . : fe80::249d:2248:f52c:c8fc%5
✓ 02:31:43 PM Saturday 2015-10-17
$ bash glew@Andy-Glew-MacBook-Pro [~/hack] c45 h1227 j0 $
$ bash ~/hack $>
$ bash 1227 $> exit
Process shell finished
我在上面输入的“exit”导致prlctl enter退出,这是它应该退出的,但它显然也被发送到emacs shell模式控制进程
--++prlctl exec在macos终端窗口中执行
Andy-Glew-MacBook-Pro:~ glew$ prlctl list
UUID STATUS IP_ADDR NAME
{3b5c5ff5-2909-4a8b-a9e6-a54d909ba98c} running - WinVM
Andy-Glew-MacBook-Pro:~ glew$ prlctl enter WinVM
Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.
C:\>echo hi
echo hi
hi
C:\>exit
exit
Andy-Glew-MacBook-Pro:~ glew$
Andy-Glew-MacBook-Pro:~ glew$
Andy-Glew-MacBook-Pro:~ glew$ prlctl exec WinVM ipconfig | grep localdomain
Connection-specific DNS Suffix . : localdomain
Tunnel adapter isatap.localdomain:
Connection-specific DNS Suffix . : localdomain
Andy-Glew-MacBook-Pro:~ glew$
这样,我可以输入更多的命令,并且可以在一个脚本中执行多个prlctl EXEC
--++prlctl exec在emacs外壳模式缓冲区中执行
$ bash glew@Andy-Glew-MacBook-Pro [~/hack] c47 h1222 j0 $
$ bash ~/hack $>
$ bash 1222 $> prlctl enter WinVM
Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.
C:\>echo hi
echo hi
hi
C:\>exit
exit
✓ 02:27:14 PM Saturday 2015-10-17
$ bash glew@Andy-Glew-MacBook-Pro [~/hack] c48 h1223 j0 $
$ bash ~/hack $>
$ bash 1223 $> exit
Process shell finished
$ bash 1226 $> prlctl exec WinVM ipconfig | grep local
Connection-specific DNS Suffix . : localdomain
Link-local IPv6 Address . . . . . : fe80::958c:20a3:da02:2903%3
Tunnel adapter isatap.localdomain:
Connection-specific DNS Suffix . : localdomain
Link-local IPv6 Address . . . . . : fe80::249d:2248:f52c:c8fc%5
✓ 02:31:43 PM Saturday 2015-10-17
$ bash glew@Andy-Glew-MacBook-Pro [~/hack] c45 h1227 j0 $
$ bash ~/hack $>
$ bash 1227 $> exit
Process shell finished
同样,看起来有一个“退出”命令被提供给
由prlctl exec提供的Windows命令解释器-它看起来像prlctl exec
构建在prlctl enter之上,并提供给
Windows命令解释器和到emacs外壳模式的控制
过程
-++在Mac终端窗口中对prlctl exec命令进行后台处理
Andy-Glew-MacBook-Pro:~ glew$ prlctl list
UUID STATUS IP_ADDR NAME
{3b5c5ff5-2909-4a8b-a9e6-a54d909ba98c} running - WinVM
Andy-Glew-MacBook-Pro:~ glew$ prlctl enter WinVM
Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.
C:\>echo hi
echo hi
hi
C:\>exit
exit
Andy-Glew-MacBook-Pro:~ glew$
Andy-Glew-MacBook-Pro:~ glew$
Andy-Glew-MacBook-Pro:~ glew$ prlctl exec WinVM ipconfig | grep localdomain
Connection-specific DNS Suffix . : localdomain
Tunnel adapter isatap.localdomain:
Connection-specific DNS Suffix . : localdomain
Andy-Glew-MacBook-Pro:~ glew$
首先,无背景:
Andy-Glew-MacBook-Pro:~ glew$ prlctl exec WinVM ipconfig | grep localdomain
Connection-specific DNS Suffix . : localdomain
Tunnel adapter isatap.localdomain:
Connection-specific DNS Suffix . : localdomain
Andy-Glew-MacBook-Pro:~ glew$ prlctl exec WinVM ipconfig | grep localdomain &
[1] 63866
Andy-Glew-MacBook-Pro:~ glew$
[1]+ Stopped prlctl exec WinVM ipconfig | grep localdomain
然后,背景:
Andy-Glew-MacBook-Pro:~ glew$ prlctl exec WinVM ipconfig | grep localdomain
Connection-specific DNS Suffix . : localdomain
Tunnel adapter isatap.localdomain:
Connection-specific DNS Suffix . : localdomain
Andy-Glew-MacBook-Pro:~ glew$ prlctl exec WinVM ipconfig | grep localdomain &
[1] 63866
Andy-Glew-MacBook-Pro:~ glew$
[1]+ Stopped prlctl exec WinVM ipconfig | grep localdomain
它挂起hre一段时间。看起来,即使在MacOS终端中
窗口,prlctl需要某种控制tty访问
exec-即使它不应该用于此命令
Andy-Glew-MacBook-Pro:~ glew$ fg
prlctl exec WinVM ipconfig | grep localdomain
^C^C
^D
^ZAndy-Glew-MacBook-Pro:~ glew$
Andy-Glew-MacBook-Pro:~ glew$
Andy-Glew-MacBook-Pro:~ glew$
-++在emacs外壳模式缓冲区中对prlctl exec命令进行后台处理
$ bash glew@Andy-Glew-MacBook-Pro [~/hack] c47 h1222 j0 $
$ bash ~/hack $>
$ bash 1222 $> prlctl enter WinVM
Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.
C:\>echo hi
echo hi
hi
C:\>exit
exit
✓ 02:27:14 PM Saturday 2015-10-17
$ bash glew@Andy-Glew-MacBook-Pro [~/hack] c48 h1223 j0 $
$ bash ~/hack $>
$ bash 1223 $> exit
Process shell finished
$ bash 1226 $> prlctl exec WinVM ipconfig | grep local
Connection-specific DNS Suffix . : localdomain
Link-local IPv6 Address . . . . . : fe80::958c:20a3:da02:2903%3
Tunnel adapter isatap.localdomain:
Connection-specific DNS Suffix . : localdomain
Link-local IPv6 Address . . . . . : fe80::249d:2248:f52c:c8fc%5
✓ 02:31:43 PM Saturday 2015-10-17
$ bash glew@Andy-Glew-MacBook-Pro [~/hack] c45 h1227 j0 $
$ bash ~/hack $>
$ bash 1227 $> exit
Process shell finished
会话文本缩进
我将注释
首先,我知道的最短的prlctl exec命令:
$ bash glew@Andy-Glew-MacBook-Pro [~/hack] c44 h1226 j0 $
$ bash ~/hack $>
$ bash 1226 $> prlctl exec WinVM echo hi &
[1] 63659
✓ 02:39:20 PM Saturday 2015-10-17
它在这里停了一会儿,但最终还是出现了下面的僵硬-
看起来prlctl正在将“退出”发送回shell模式
$ bash glew@Andy-Glew-MacBook-Pro [~/hack] c45 h1227 j1 $
$ bash ~/hack $>
$ bash 1227 $> exit
Process shell finished
使用较长的命令,如“prlctl exec…”。。。ipconfig”,将显示更多内容:
$ bash glew@Andy-Glew-MacBook-Pro [~/hack] c44 h1227 j0 $
$ bash ~/hack $>
$ bash 1227 $> prlctl exec WinVM ipconfig | grep localdomain &
[1] 58231
✓ 02:36:10 PM Saturday 2015-10-17
上面是我输入的prlctl exec命令
$ bash glew@Andy-Glew-MacBook-Pro [~/hack] c45 h1228 j1 $
$ bash ~/hack $>
$ bash 1228 $> exit
There are stopped jobs.
[1]+ Stopped prlctl exec WinVM ipconfig | grep localdomain
✓ 02:36:10 PM Saturday 2015-10-17
好的,它在这里暂停了一会儿。然后它看起来像prlctl exec
开始向emacs外壳模式控制进程发送垃圾:
$ bash glew@Andy-Glew-MacBook-Pro [~/hack] c45 h1229 j1 $
$ bash ~/hack $>
$ bash 1229 $> [2] 58298
✓ 02:36:10 PM Saturday 2015-10-17
$ bash glew@Andy-Glew-MacBook-Pro [~/hack] c46 h1230 j2 $
$ bash ~/hack $>
$ bash 1230 $> bash: his:: command not found
✗ 02:36:10 PM Saturday 2015-10-17
$ bash glew@Andy-Glew-MacBook-Pro [~/hack] c47 h1231 j2 $
$ bash ~/hack $>
$ bash 1231 $> bash: s: command not found
✗ 02:36:10 PM Saturday 2015-10-17
$ bash glew@Andy-Glew-MacBook-Pro [~/hack] c48 h1232 j2 $
$ bash ~/hack $>
$ bash 1232 $> ✗ 02:36:10 PM Saturday 2015-10-17
$ bash glew@Andy-Glew-MacBook-Pro [~/hack] c48 h1233 j2 $
$ bash ~/hack $>
$ bash 1233 $> bash: e: command not found
这就像他们向shell发送的文本没有得到响应(可能是emacs配置的结果),并导致各种各样的打嗝:
[2]+ Stopped prlctl exec WinVM ipconfig | grep localdomain
✗ 02:36:10 PM Saturday 2015-10-17
$ bash glew@Andy-Glew-MacBook-Pro [~/hack] c49 h1234 j2 $
$ bash ~/hack $>
$ bash 1234 $> bash: syntax error near unexpected token `.*'
✗ 02:36:10 PM Saturday 2015-10-17
$ bash glew@Andy-Glew-MacBook-Pro [~/hack] c49 h1235 j2 $
$ bash ~/hack $>
$ bash 1235 $> > > > ✗ 02:36:10 PM Saturday 2015-10-17
bash: syntax error near unexpected token `1'
> > > ✗ 02:36:10 PM Saturday 2015-10-17
bash: syntax error near unexpected token `1'
现在我有很多这样的东西…剪
bash: syntax error near unexpected token `1'
✗ 02:36:10 PM Saturday 2015-10-17
> > > > > > > > > > > > > > > > > > bash: syntax error near unexpected token `)'
✗ 02:36:10 PM Saturday 2015-10-17
bash: !s\21\^KE\332n\216^C\340^C\262^E\223\377\315^D^W\236^D\375\236\270^D\325^P^[^?\376^C\234g000O\205UE\257p: event not found
✗ 02:36:10 PM Saturday 2015-10-17
[3] 58511
[3] Exit 127 Q\320^C\3660\307\203\351wk\244
✗ 02:36:10 PM Saturday 2015-10-17
…更多的是相同的-看起来像控制代码
✗ 02:36:10 PM Saturday 2015-10-17
bash: syntax error near unexpected token `)'
✗ 02:36:10 PM Saturday 2015-10-17
bash: syntax error near unexpected token `&'
Process shell bus error: 10
实际上,我几乎不愿意显示前一行,因为它暗示了一个shell错误
-+配置信息
MacBook Pro 2014年年中
$ bash 1229 $> uname -a
Darwin Andy-Glew-MacBook-Pro.local 14.5.0 Darwin Kernel Version 14.5.0: Wed Jul 29 02:26:53 PDT 2015; root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64
平行版本
$ bash 1230 $> prlctl --version
prlctl version 10.3.0 (29227) rev 0
From the Parallels Desktop about:
Version 10.3.0 (29227)
(same as for the command line)
Windows版本
Manually editing systeminfo to keep only the good bits
$ bash 1232 $> prlctl exec WinVM systeminfo
OS Name: Microsoft Windows 8.1 Pro
OS Version: 6.3.9600 N/A Build 9600
OS Manufacturer: Microsoft Corporation
OS Configuration: Standalone Workstation
OS Build Type: Multiprocessor Free
System Boot Time: 10/17/15, 1:56:38 PM
System Manufacturer: Parallels Software International Inc.
System Model: Parallels Virtual Platform
System Type: x64-based PC
Processor(s): 1 Processor(s) Installed.
[01]: Intel64 Family 6 Model 70 Stepping 1 GenuineIntel ~2793 Mhz
BIOS Version: Parallels Software International Inc. 10.3.0 (29227) rev 0, 9/21/15
Total Physical Memory: 12,272 MB
Available Physical Memory: 8,753 MB
Virtual Memory: Max Size: 14,128 MB
Virtual Memory: Available: 10,808 MB
Virtual Memory: In Use: 3,320 MB
$ bash glew@Andy-Glew-MacBook-Pro [~/hack] c47 h1233 j0 $
$ bash ~/hack $>
$ bash 1233 $> exit
Process shell finished
and, as usual, prlctl exec closes the emacs shell-mode buffer I ran in in
(emacs版本)
为了在后台运行Parallels exec,我找到了两种不同的方法: 将null发送到STDIN,您的命令不应提供任何输出。请参见示例:
prlctl exec 'Windows XP' /temp/script.bat argument1>NUL </dev/null &
请参阅此工作示例(适用于Linux和Mac):
我希望这有帮助谢谢。I/O重定向有帮助。但是(1)我仍然无法将参数传递给prlctl.bat脚本-既不能直接传递,也不能尝试通过command.exe/c运行它们,以及(2)我无法打开像记事本这样的GUI应用程序。//如中所述,我已切换到使用VirtualBox实现自动化-但我希望跨并行程序实现自动化,因为并行程序在某些方面比VirtualBox做得更好。