Cannot run atom from Bash (Windows 10)


#1

Hello!

I’ve been trying to run atom folder_name or file_name straight from command line (I am using Bash Ubuntu on Windows).
I am frustrated right now, because after 2 hours of research on the internet I couldn’t find any solution for my problem. I’ve tried reinstalling atom and Bash Ubuntu and nothing worked.
Every time I type “atom” in shell I get a prompt: “atom: command not found”.

I admit I am new to these things, but I had no problems with this using Windows 7. Is there anyone who could guide me through this problem or at least share with me a link to the solution since I am obviously a bad researcher for now… :frowning:

I am using Windows 10 and my Atom version is: 1.10.2

Regards,
xeho91


#2

I think you have to install Atom in bash. As far as I’m aware, it’s treated as a separate environment, besides, your Atom install itself will be doing things the Windows way, not the Linux way.

Alternatively, I don’t know if maybe you can require it from its /mnt/c/wheres/my/atom/ location.


#3

I tried installing Atom the Linux way (I used this as guide).

As in the following instructions I did use "$ sudo dpkg --install atom-amd64.deb"
I get the prompt:

(Reading database … 36376 files and directories currently installed.)
Preparing to unpack atom-amd64.deb …
Unpacking atom (0.141.0) …
dpkg: error processing archive atom-amd64.deb (–install):
trying to overwrite ‘/usr/bin/apm’, which is also in package apmd 3.2.2-14build1
Processing triggers for mime-support (3.54ubuntu1.1) …
Errors were encountered while processing:
atom-amd64.deb

Does this mean I have to uninstall Atom (the one installed the ‘Windows way’)?


#4

Not at all, because you’re not running into a conflict with the Windows version of Atom. It’s a conflict with the Advanced Power Management binary, as described in this issue. You can safely uninstall apmd 3.2.2-14build1.


#5

Alright, so I did uninstal the apmd using "$sudo apt-get remove apmd"
and then I was able to unpack atom-amd64.dev without problems.
There is the prompt:

$ sudo dpkg --install atom-amd64.deb
(Reading database … 36355 files and directories currently installed.)
Preparing to unpack atom-amd64.deb …
Unpacking atom (0.141.0) …
Setting up atom (0.141.0) …
Processing triggers for mime-support (3.54ubuntu1.1) …

But a new error encountered now when I tried to use “$ atom”. I got this prompt:

$ atom
/usr/share/atom/atom: error while loading shared libraries: libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory

I did some short research, used this source as guide.

I installed the packages using:
$ sudo aptitude install libgtk2.0-0 libgconf2-4 libasound2 libnss3 libxtst6
and
$ sudo aptitude install libgnome-keyring0

After instalation I try to run the command “$ atom” once again.
, I get another error. This is the prompt:

/usr/bin/atom: line 92: 2276 Aborted (core dumped) nohup “ATOM_PATH" --executed-from="(pwd)” --pid=$$ “$@” > “$DOT_ATOM_DIR/nohup.out” 2>&1
[2276:0926/115453:ERROR:browser_main_loop.cc(162)] Running without the SUID sandbox! See https://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment for more information on developing with the sandbox on.
[2276:0926/115453:FATAL:render_sandbox_host_linux.cc(40)] Check failed: 0 == shutdown(renderer_socket_, SHUT_RD). shutdown: Invalid argument

Also I found out that I got invalid arguments in “$ apm”. I don’t know if this could help recognize the problem,I already got lost here.

$ apm

/usr/share/atom/resources/app/apm/node_modules/atom-package-manager/node_modules/npm/node_modules/npmconf/config-defs.js:261
, “local-address” : Object.keys(os.networkInterfaces()).map(function (nic) {
^
Error: EINVAL, invalid argument
at Object. (/usr/share/atom/resources/app/apm/node_modules/atom-package-manager/node_modules/npm/node_modules/npmconf/config-defs.js:261:38)
at Module._compile (module.js:456:26)
at Object.Module._extensions…js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/usr/share/atom/resources/app/apm/node_modules/atom-package-manager/node_modules/npm/node_modules/npmconf/npmconf.js:4:18)
at Module._compile (module.js:456:26)
at Object.Module._extensions…js (module.js:474:10)


#6

It should be mentioned that graphical applications aren’t officially supported by Ubuntu on Windows. That doesn’t mean it’s not possible, but I wonder why you want to go that road in the first place. You can, for instance, use Linux compilers in the Windows version of Atom (see this example for g++).