2

I do a lot of text editing with Atom as my IDE of choice. There seems to be some upgrade recently pushed to the Atom snap that prevents Atom from restoring the previous state. Whatever folders were previously open, if I close Atom and then reopen I get two empty files that Atom wants to save:

  • /home/user/ATOM_DISABLE_SHELLING_OUT_FOR_ENVIRONMENT=false
  • /usr/bin/atom

Every time, I have to close these files and then reopen my project folder. This happens on both my laptop and my desktop. Is anyone else seeing this? Is there a workaround, other than downloading the .deb installer from the Atom website?

7
  • Ahh... Installing the .deb is not a solution, since python2 is a dependency! I was feeling happy to be finally rid of two versions of python Jun 17, 2020 at 19:00
  • FlatPak version may be an option too.
    – N0rbert
    Jun 17, 2020 at 19:07
  • I asked also the same question: askubuntu.com/questions/1251269/…
    – FedKad
    Jun 17, 2020 at 19:17
  • Does Ubuntu have FlatPak? I thought everything was snaps Jun 17, 2020 at 19:18
  • Ubuntu has a package named flatpak and you can install the Atom flatpak package in Ubuntu 18.04 and later.
    – karel
    Jun 26, 2020 at 15:54

4 Answers 4

1

I experienced the same problems with Ubuntu 20.04 and the upgraded snap for Atom.

I edited the atom.desktop file that the launcher uses to remove the refs to:

  • /home/user/ATOM_DISABLE_SHELLING_OUT_FOR_ENVIRONMENT=false
  • /usr/bin/atom

Following the thread at discuss.atom.io:

  1. Install menulibre to easily edit the menu .desktop entries

    sudo apt install menulibre
    
  2. Run menulibre and search for "atom"

  3. Edit the Application detail Command to remove and save:

    ATOM_DISABLE_SHELLING_OUT_FOR_ENVIRONMENT=false /usr/bin/atom
    
0

Apparently my Google skills now are better than they were 15 minutes ago. This website reports the problem and seems to suggest a solution. I'll go try that.

But it seems that the snap package for Atom should be considered broken until the start script gets fixed.

4
  • snap info atom will tell you where to check for an already-filed bug report. You might be the first to report it. Unreported bugs don't get fixed.
    – user535733
    Jun 17, 2020 at 19:04
  • interesting. No apport reporting to launchpad? Ubuntu has changed a lot since the days when I actually spent time on bug fixes... Jun 17, 2020 at 19:19
  • I reverted to the previous version of atom snap. And I am waiting for an update from Ubuntu...
    – FedKad
    Jun 17, 2020 at 19:25
  • Debs can be reported via apport to Launchpad; maintenance is a community effort. Snaps must be reported directly to to the snap author; snaps are a community effort only if the Snap author bothers to make it so. Malicious Snaps (not bugs) can be reported to the Snap Store so the Snap can be pulled.
    – user535733
    Jun 17, 2020 at 19:44
0

Okay. I found the solution. The run command of the Atom includes the following code:

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

So, just delete the part /usr/bin/atom ATOM_DISABLE_SHELLING_OUT_FOR_ENVIRONMENT=false %F or change the whole code to:

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

You can use Menulibre or AppEditor to edit the run command of Atom.

I think this is primarily because there's no file /usr/bin/atom and this code is probably for the .deb package. As this is the snap package, the package is stored in /snap/bin/atom and when Atom runs, unable to find the file /usr/bin/atom, it creates two blank files.

0
#Open this file:
sudo nano /var/lib/snapd/desktop/applications/atom_atom.desktop

# Replace this 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 this line:
Exec=env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/atom_atom.desktop /snap/bin/atom %F

This is just a temporary work-around. The edits above get overwritten each time the snap package updates. I'm requesting a more permanent solution here.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .