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.


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


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


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


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.


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.


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:


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:

1 Like

also I advice to create a backup of your changed desktop file, because on some updates of atom it will be overwritten again:

sudo cp /var/lib/snapd/desktop/applications/atom_atom.desktop /var/lib/snapd/desktop/applications/atom_atom.desktop.bak
1 Like

I see you guys have already found a solution, very good. I have also found a solution on StackExchange which is slightly more compact; it uses a single-line command to fix this issue. Also, that solution is slightly different from the one suggested here in that it uses a different configuration string. I think it might be interesting for you to investigate, so I’m linking it here:


I have no idea which solution is better, but apparently neither have you :wink:

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

I had this same problem. The solution above worked (editing the line in the .desktop file). But then I had an unrelated Ubuntu problem that required fsck to fix. After fixing that, the Atom problem above reappeared. No idea if there is a connection, but I’m inclined to think there is. Maybe someone more computer-savvy than myself can say…

For those encountering this problem in the future: while the quick fix suggested above to edit /var/lib/snapd/desktop/applications/atom_atom.desktop works temporarily, the problem will keep reappearing every few weeks, probably whenever atom updates.

The true source of the problem is that snap is not supported by atom and installing through snap is buggy. If you are having this issue, you must have installed atom through snap at some point. To fix it:

  1. Uninstall the buggy snap version of atom: sudo snap remove atom. Note this preserves your custom user configurations in .atom

  2. Make sure that atom is now removed from your system (search for atom in the dash and try running atom in a terminal)

  3. Reinstall via the supported method by downloading the .deb directly from atom.io

So far it’s working for me and hopefully I don’t have to keep editing the file manually anymore to remove the bug.