Sublime Text 2 Projects via Samba

Firstly, if you're using Sublime Text 2, you rock.

Secondly, if you are using Sublime Text 2, and have a project setup which is connected to a Samba share, then you may have noticed that the files wont refresh in the sidebar, as they do when you're running a local project.

I asked about this over at the forums to which Jon has explained that the Samba share does not send a changed file notification event which means that the ReadDirectoryChangesW function from Win32API does not know anything has changed.

To fix this you can simply add change notify = yes to your smb.conf file. Read further for instructions under Ubuntu.

Editing your Samba configuration file under Ubuntu

  1. Open a Terminal
  2. Type sudo gedit /etc/samba/smb.conf alternatively you can use vi, nano or whatever your favorite editor is
  3. Add the change notify = yes line to anywhere under the [global] setting
  4. Save and close.
  5. Now run sudo restart smbd then sudo restart nmbd
  6. Voila. Your project should start refreshing.

Note: I had to disconnect, then reconnect my share before it would work.


comments powered by Disqus