Halp! Cannot open single files in Atom from Ubuntu File Manager!


Atom is an awesome text editor. And, to a certain point in time, it worked excellently on my Ubuntu machines. However, something broke (I’m guessing, with some update to either Atom or nautilus?), and I cannot open individual files anymore from nautilus, the Ubuntu file manager!

See video on YouTube for demonstration of this behavior: https://youtu.be/uTKoIEkTrKc-

What I have tried:

  • running atom --clear-window-state in terminal
  • running mv ~/.atom ~/.atom-backup
  • running sudo apt remove --purge atom* && sudo apt install atom
  • any combination of the above 3
  • install on a machine previously without Atom

How can I fix this? Please, halp!

Additional information:

  • Opening a file in Atom from terminal seems to work fine, i.e. atom filename.txt
  • All three of my Ubuntu machines are running Ubuntu 16.04.4 LTS with all the latest updates

P.S. I was tempted to write “Feature request: ability to open files!” for the title, but restrained myself, :joy::rofl::joy:


Something similar is happening to me but on macOS. I’ve been using Atom just fine for over a week and suddenly I can’t open files in any of the following ways:

  • drag and drop from Finder
  • Cmd + O
  • Cmd + Shift + P then “open” then Enter
  • Cmd + N

I tried deleting the app file and redownloading to no avail. I also nuked my ~/.atom folder in case it was some rogue package causing the issue, but still no improvement. I’m not able to test any of the CLI stuff since I don’t have admin and can’t install the CLI tools.


@avonmoll, I confirm that opening a file from the menu (essentially, equivalent of Cmd + O on MacOS) doesn’t work for me either.


Do you think we should file an issue/report on GitHub for Atom? Since there is two of us and you are using MacOS, I’m suspecting this might be a bug in Atom, not Gnome Files/nautilus. Just say the word and I’ll post it.


You could do that. Unfortunately I don’t see any error messages in the developer console so I really have no idea what’s going on or what additional information can be relayed to the developers.


Seems like someone beat us to it: https://github.com/atom/atom/issues/16653. If you could mark/upvote somehow, maybe this will get more attention.


Just replied in that issue @Algomorph, it would be good to know if you can repro using one of the official install methods (e.g. just to test, you could try with the .deb from https://atom.io).


@rsese, thanks, but no luck. Still the same issue with the official 1.24.1. Strange, but “About Atom” from the menu doesn’t open either.


Hmm, after you installed from the .deb, did you run through the debugging steps again (e.g. clear saved state, reset to factory defaults) before trying again?

@avonmoll - just to clarify since I think you didn’t mention in your comments, did you also try clearing saved state (saved any unsaved data first)?


@rsese - I couldn’t run atom --clear-window-state because I don’t have the CLI tools installed (since I don’t have admin on this machine). I figured that the saved state would be somewhere in ~/.atom, but perhaps that is not entirely true.


@rsese, yes, I have run through the debugging steps before trying again. Unfortunately, that didn’t help.


@avonmoll ahh sorry I missed that you mentioned that. If you install an older version of Atom that worked for you, do things work for you again?

@Algomorph I just noticed in your video that you’re working with files that might not be local to your computer or the files are on another drive? Just to confirm, do you have the same problem when you try top open a file that in your local home directory for example?


@rsese, unfortunately, the problem occurs independent of where the file that’s being opened resides. I tried again on files in my home directory, and got the same result.


Hmmm, not sure what else could be wrong - I have Ubuntu 16.04 running in a VM and don’t have the same problem.

Do you have issues with any other applications when opening files from Nautilus? Do you notice any errors relating to Nautilus or Atom in any system log files?

If you install an older version of Atom where things were working do you still have the same problem?


I have run searchmonkey on the /var/log folder, it appears that there are no errors relating directly to nautilus since 2015, and there is nothing related to atom in the logs. I did notice some error (which I verified to be a known error) in RabbitVCS, which I have installed in Gnome Files for git/svn management. But the latter error is from a day ago and doesn’t recur in the most recent syslog when I try to open up files in Atom, so I don’t think it’s related. To verify, I uninstalled RabbitVCS & all it’s dependencies & rebooted nautilus, but I’m still getting the same effect when trying to open files with Atom.

I also tried to install atom 1.21.2 from the .deb in official github releases, cleared window cache, removed .atom, but I’m getting the same problem, exactly the same symptoms.

When I run “nautilus -q” in terminal to quit all nautilus instances, I’m getting the following printed every time:

(nautilus:7005): GLib-GIO-CRITICAL **: g_dbus_interface_skeleton_unexport: assertion ‘interface_->priv->connections != NULL’ failed

(nautilus:7005): GLib-GIO-CRITICAL **: g_dbus_interface_skeleton_unexport: assertion ‘interface_->priv->connections != NULL’ failed

(nautilus:7005): Gtk-CRITICAL **: gtk_icon_theme_get_for_screen: assertion ‘GDK_IS_SCREEN (screen)’ failed

(nautilus:7005): GLib-GObject-WARNING **: invalid (NULL) pointer instance

(nautilus:7005): GLib-GObject-CRITICAL **: g_signal_connect_object: assertion ‘G_TYPE_CHECK_INSTANCE (instance)’ failed

Not sure if it’s related at all.


@rsese, thank you for all your help. I have finally gotten to the bottom of this problem.

The issue was with the original deb installed on my system from the ppa:webupd8team/atom repository. It generated an incorrect launcher string for Atom.
I’m guessing the string was intended for some other version of Nautilus or Nemo on Cinnamon/Mint, I’m not sure, but it (1) contained an absolute path to somewhere in the share folder instead of using the shrotcut in the bin directly and (2) had %F instead of %U at the end. It did not correspond to the ones I had for GEdit or Notepadqq. I noticed the launcher was not visible in alacarte (a.k.a. “Main Menu” app) after I uninstalled/purged atom, but whichever changes I made to it would be preserved after a complete purge/reinstall. So I simply altered the launcher like so:


After this, everything started working like a charm.

@avonmoll, is it possible you’re suffering from a similar issue with the launcher syntax in MacOS? I’m not sure how one would go about changing that, but maybe you know?



Thanks for the information @Algomorph!

I’m not super experienced with macOS and to be honest I wasn’t really able to really understand how processes are launched from .app files. However, your success inspired me to do a little more poking elsewhere.

Solution (for me): basically just manually ‘install’ CLI tools and clear window state

$ ln -s /Users/$USER/Applications/Atom.app/Contents/Resources/app/atom.sh /Users/$USER/bin/atom
$ ln -s /Users/$USER/Applications/Atom.app/Contents/Resources/app/apm/node_modules/.bin/apm /Users/$USER/bin
$ atom --clear-window-state

This boggles my mind though – what does clear-window-state actually do!?


Thanks to both of you for tracking down and sharing what the issues were on your systems :bow:

It removes per project data like what files you had open, unsaved data, and other state:


I’ve seen some odd reports here and there where clearing saved state as recommended in the debugging guide will clear things up.


I may not have discovered the root cause on my system because this seems to keep happening almost every time I close and re-open (by launching from Atom.app) Atom.

I have noticed that if I call atom from command line that I almost never run into the issue.

Every now and again, if I do atom --clear-window-state and then close and relaunch Atom.app it will work fine. Things seem to go awry when I try to open a file using Cmd-o. However, if launched from command line, this doesn’t seem to be an issue.

Perhaps if I were not a macOS novice I could understand a little more of why this is happening. For now, I will just use command line to launch :smiley:.