简体   繁体   English

SSH进入系统时,是否可以像我执行VIM那样从命令行启动Netbeans?

[英]When SSHing into system, is there a way to launch netbeans from command-line like I do VIM?

VIM seems integrated to the terminal. VIM似乎已集成到终端。 Can I open a remote file from the command-line with netbeans? 我可以使用netbeans从命令行打开远程文件吗? Does it have shell integration? 它有外壳集成吗? Any further explanation on this so I can better conceptually understand it would be very appreciated. 任何对此的进一步解释,以便我可以更好地从概念上理解它,将不胜感激。

Yes, you can, providing certain conditions are met! 是的,只要满足某些条件,您就可以!

Using ssh, you can tunnel the display of X-Window applications, meaning you can run the application (the X-Client) on one machine, and have it display on another (the X-Server). 使用ssh,您可以建立X-Window应用程序的显示通道,这意味着您可以在一台计算机上运行该应用程序(X-Client),并在另一台计算机(X-Server)上显示该应用程序。

You'll need to launch ssh with the -X option (or -Y, but preferably -X) to allow tunnelling, and then run NetBeans from the commandline as usual: 您需要使用-X选项(或-Y,但最好是-X)启动ssh以允许隧道传输,然后像往常一样从命令行运行NetBeans:

netbeans MyFile.java

Few options: 几种选择:

  1. Using ssh -X to forward X. Then you can start netbeans remotely. 使用ssh -X转发X。然后您可以远程启动netbeans。
  2. Use sshfs so you mount the remote filesystem locally over ssh. 使用sshfs,以便通过ssh在本地挂载远程文件系统。 You can use then local copy of netbeans to work on remote files. 然后,您可以使用Netbeans的本地副本来处理远程文件。
  3. Using rsync to have a local copy 使用rsync拥有本地副本
  4. The best one - use version control 最好的一种-使用版本控制

Read about X-forwarding . 了解有关X转发的信息 The link points to a very verbose and detailed howto/tutorial. 该链接指向一个非常冗长而详细的howto / tutorial。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 当程序具有命令行参数时,如何使用 GDB 分析程序的核心转储文件? - How do I analyze a program's core dump file with GDB when it has command-line parameters? 如何从命令行生成android debug.keystore? - How do I generate an android debug.keystore from the command-line? 如何从 Bash 命令行在后台 Vim 打开另一个文件? - How to open another file in background Vim from Bash command-line? 我想将Bash脚本的所有命令行参数存储到单个变量中 - I would like to store all command-line arguments to a Bash script into a single variable Linux命令行调用没有从os.system返回它应该的内容? - Linux command-line call not returning what it should from os.system? AppEngine SSL从命令行失败 - AppEngine SSL fail from command-line shellScript 在新的 shell 中通过 SSH 执行命令 - shellScript to execute a command in new shell from SSHing 有什么方法可以知道 Python 中单独程序可用的命令行选项吗? - Is there any way to know the command-line options available for a separate program from Python? PySpark:如何在工人上安装linux命令行工具? - PySpark: How do I install a linux command-line tool on workers? 如何使用编译器的命令行选项禁用易失性存储类? - How do I disable the volatile storage class using command-line options to the compiler?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM