如何从bash中打开atom,在windows 10中运行?

时间:2017-08-21 23:10:26

标签: windows bash windows-subsystem-for-linux

我知道之前已经问过这个问题,但随后又收到了一个不太好的答案。时间虽然变了,但我想知道今天是否可能?

3 个答案:

答案 0 :(得分:2)

要在特定目录上启动Atom,请使用命令;

/**
 * Pop the last fragment transition from the manager's fragment
 * back stack.  If there is nothing to pop, false is returned.
 * This function is asynchronous -- it enqueues the
 * request to pop, but the action will not be performed until the application
 * returns to its event loop.
 *
 * @param name If non-null, this is the name of a previous back state
 * to look for; if found, all states up to that state will be popped.  The
 * {@link #POP_BACK_STACK_INCLUSIVE} flag can be used to control whether
 * the named state itself is popped. If null, only the top state is popped.
 * @param flags Either 0 or {@link #POP_BACK_STACK_INCLUSIVE}.
 */

答案 1 :(得分:1)

首先,获取计算机中atom.exe的文件位置。然后,在.bashrc文件的末尾添加以下行。

alias atom='/mnt/c/<FileLocation>/atom.exe'

然后,键入

从WSL运行文件
atom <filename>

答案 2 :(得分:0)

  1. 安装VcXSrv(https://sourceforge.net/projects/vcxsrv)。请按照以下说明操作:https://solarianprogrammer.com/2017/04/16/windows-susbsystem-for-linux-xfce-4/

  2. 从Win10中的Bash运行:

    • sudo add-apt-repository ppa:webupd8team / atom
    • sudo apt update; sudo apt install atom
    • sudo apt-get install libxss1
    • export DISPLAY =:0.0
    • 原子