No "Open With Atom" context menu entry with Nautilus


Similar to

However in my case it did not “disappear”. There is and was just never such a context menu entry as “Open With Atom”.
For files this is not a problem (and is rather a good thing) as I can select “Open With” --> “Atom” there anyway, but for folders it would really be convenient to have this menu entry.

Nautilus 3.14.1-2
Atom 1.11.2 (but happened with previous versions too)
Debian Jessie


I’ll try to add one manually as described here, but still this is more of a workaround.

Also the same question is asked here:

However I don’t see this “Open With” menu on folders.



No actually this menu is not there. It is only shown for files.


I’m running Ubuntu 16.10 with Gnome 3.20.4, and I’ve configured my Gnome Files (nee Nautilus) to allow me to open Atom in the current folder (right click on an empty space in the current folder). I used the Nautilus-Actions Configuration Tool (nautilus-actions package), but I suspect you can edit the Nautilus config file directly. Here’s the config I’m using in the gui tool:


Yes, I also saw it works like this, but native support would be preferable.


change “atom.desktop” (locations: “/usr/share/applications/atom.desktop” and “~/.local/share/applications/atom.desktop”)

#sudo nano /usr/share/applications/atom.desktop

change for:

after save
#sudo update-desktop-database (command for build a cache database of the MIME types handled by desktop files)

my atom.desktop and script for update menus in:


The link “” has been deleted, the fix has been proposed in the atom’s official github!


Can you give me a link?

I think the change in the Atom.desktop file could/should be included in the official *.deb files.



EDIT: more information here:

There is an alternative that I prefer, by adding an entry in the Nautilus context menu. Please note that python-nautilus must be installed to work. Write a scritp in .local/share/nautilus-python/extensions (create the directory if it does not exist already) with the following code:

import os

from gi.repository import Nautilus, GObject

class AtomOpenDirectory(GObject.GObject, Nautilus.MenuProvider):
    def __init__(self):

    def menu_activate_cb(self, menu, file):
            path = file.get_location().get_path()
            os.system("atom %s & pid=&!" % path)
        except AttributeError: # it is a list of elements
            dir_list = [f.get_location().get_path() for f in file if f.is_directory()]
            os.system("atom %s & pid=&!" % ' '.join(dir_list))

    def define_menu_helper(self, name, window, file):
        item = Nautilus.MenuItem(name="AtomOpenDirectory::" + name,
                                 label="Open directories in Atom",
                                 tip='', icon='')
        item.connect('activate', self.menu_activate_cb, file)
        return item,

    def get_background_items(self, window, file):
        return self.define_menu_helper("Background", window, file)

    def get_file_items(self, window, file):
        return self.define_menu_helper("File", window, file)

and reload nautilus (killall nautilus). The context menu should appear when you click on the background of a directory and on a list of selected files. From the list, only directories will be opened (added as project dirs).


At least on folders the menu entry is shown, but it does not open Atom when I click on it.


Is atom in your PATH?


There is a mistype in the code. Please refer to the one in the link at the top of the post:

I’ll correct my previous post.

EDIT: now it is correct.