You are here
Im looking for some general guidance on how best to setup a simple dev machine.
I am working on a project that requires a simple web server (no backend processing just delivery of HTML/CSS/JS files) and want to live edit the files the server is dishing out. Im working on 2 machines around the house and using Brackets as the text editor on both.
Brackets has various extensions that work with SFTP (and maybe SSH?) but these seem to require synching and what I want to do is write directly into the folder that is being served (this allows Brackets to work with Chrome to provide live updates as soon as I save (or as I type with CSS changes).
If the right process is to create a samba share and map a drive to it: What are the issues I need to be aware of re permissions?
Is there a better way?
Thanks in advance.
IMO the "better way" is to ssh in and install "proper" vim! :)
So short answer is that Samba is a totally legitimate option. There are lots of other (better IMO) options too.
Despite Samba being a legitimate option, my inclination is to adjust your host OS to work nicely with TurnKey (and Linux in general), rather than adjusting TurnKey to work nicely with your host OS. My rational is that then your host OS will integrate with any TurnKey (and/or Linux) instance you launch OOTB. It makes VMs much more disposable which IMO is the way it should be...
IMO the way to go would be to install SSHFS and then mount the remote directory via SSHFS. For Mac and Linux that should be fairly straight forward. If you have Windows, then have a look here. TBH I haven't used it since Win7 some time ago, but it worked quite well (occasional crashes on waking from sleep). My suspicion is that it'd be even better now...
Alternatively, back when I used to use Windows lots, I used Notepad++ with the SFTP extension. IIRC there was a config option to auto sync when files are saved. So you still need to save, but then the file auto syncs. Perhaps the SFTP extensions for your IDE can be configured the same? If not, it's probably worth forwarding it as a feature request.
Thanks Jeremy, is there a
Thanks Jeremy, is there a Turnkey appliance with SSHFS and Apache already installed?
Windows 10 64bit with HyperV - learning Javascript slowly
SSHFS needs to be installed on your Windows system
I have a vague recollection that by default SSHFS sessions cache content. But that may just be the default Linux client behaviour? If you have issues getting the "instant" result you are after, you may need to explicitly turn off the caching. Let's cross that bridge if we get to it though...
The LAMP appliance includes Apache, as well as MySQL and a number of languages starting with 'P'! :) (PHP, Python and Perl). The LAPP appliance is very similar except has PostgreSQL (instead of MySQL).
Thanks Jeremy,This has been
Thanks Jeremy,
This has been a really big help.
Think there should be a big flag - Dont install Samba till you have tried this...
All very straight forward - winssfhs has some issues with versions and seems to be be light on instructions and tutorials for set up but it doesnt need a lot to get working.
For info - Installed on 64bit Windows 10 using Win SSHFS 1.5.12.8 and Dokan 0.7.4.
Needed to get the settings right before it behaved nicely (otherwise explorer became unresponsive) and had to delete settings (in c:\users\USERNAME\appdata\local\winSshFS) inbetween attempts.
No longer thinking about samba (nice)
In the screenshot below - it works (ie mounted I: drive to/var/www) but - mount folder seems not to do anything. (Not sure what/if it was meant to do) leaving it blank seems not to change anything.
Windows 10 64bit with HyperV - learning Javascript slowly
Glad to hear that worked!
Like I said, the real advantage IMO is that you can now use that with any TurnKey appliance OOTB with no need to install extra stuff in Linux! :)
Also thanks for posting back with your feedback. Hopefully that will help guide others looking to do something similar!
Better instructions
Just installing again and came accross this
https://igikorn.com/sshfs-windows-10/
Windows 10 64bit with HyperV - learning Javascript slowly
Thanks Nick
Add new comment