Whenever I start Atom it opens a file weird file

This is a weird issue that I tried searching, I didn’t find anything yet. But when opening atom every time, if I haven’t already specified a file to open it opens files called “Atom” and “ATOM_DISABLE_SHELLING_OUT_FOR_ENVIRONMENT=false” how can I fix this?

I am on the latest version of ubuntu.

6 Likes

I have precisely same bug; it appeared some 2-3 days ago
Possibe another symptom - before that bug appeared when i opened atom it projects and files that were opened in previous session, but now it does not do this, it only opens these strange two files

1 Like

Found solution

When i looked into default command to open atom, it looked like

env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/atom_atom.desktop /snap/bin/atom ATOM_DISABLE_SHELLING_OUT_FOR_ENVIRONMENT=false /usr/bin/atom %F

and apparently it decided that it should use /snap/bin/atom to open ATOM_DISABLE_SHELLING_OUT_FOR_ENVIRONMENT=false and /usr/bin/atom

so i just removed that part of opening script and these files stopped to open

2 Likes

Elaborating on what @monroth suggested, the following steps solved it for me:

Edit /var/lib/snapd/desktop/applications/atom_atom.desktop:

Replace the line

Exec=env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/atom_atom.desktop /snap/bin/atom ATOM_DISABLE_SHELLING_OUT_FOR_ENVIRONMENT=false /usr/bin/atom %F

with

Exec=env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/atom_atom.desktop /snap/bin/atom %F

although I am not sure if the ATOM_DISABLE_SHELLING_OUT_FOR_ENVIRONMENT-Parameter is actually useful and just not properly positioned.

9 Likes

Please note Atom does not have a snap distribution; if it is on snap, it is being distributed by a third party and you should raise any issues with them instead. You can find the official installation methods here.

The error described in this post only occurs on the snap version, it’s not something that is going to be fixed by Atom.

1 Like

That fixed it, thanks!

using apt-get resulted in ubuntu telling me to use snap. (But also, I only got into linux a week ago so I may be doing it wrong).

I believe apt just notices that a package it knows about provides the command that is missing. So because it knows about the snap package, and the snap package offers an atom command. it suggests that.

The official installation method involves adding the Atom repository to let apt find it too.

I searched a bit, what hanged: you remove the part ATOM_DISABLE_SHELLING_OUT_FOR_ENVIRONMENT=false /usr/bin/atom :wink:

3 Likes

just wanted to say thank you! I’ve been struggling with this problem for the past month and it’s been messing with my mind; but now that I’ve fixed it I can breath once again, thank you, thank you a lot :+1: :+1: :+1: :+1: :+1: