I recently moved to Linux on my desktop, after many years of being Windows-by-default. I was never fervently for or against Windows, but eventually the advantages for web development of working on the same OS as my servers, not to mention a much more potent OS in terms of local development, were too great to ignore. In this post I want to share a few practical tips, which will hopefully be of use to someone else making the transition.
I’ve kept my old Windows installation. I occasionally need it for watching DVDs or Blu-Rays that Linux can’t manage. Apart from that, I’ve barely returned to Windows. I won’t go into the ins and outs of getting dual-booting going – like most things here, there’s plenty of tutorials out there, and I didn’t encounter any real gotchas. I will say that the Linux GRUB boot loader is far superior to the one Windows supplies, so if given the option, choose GRUB.
Image editing software
The other potential reason for keeping Windows is Linux’s lack of Photoshop. GIMP tries hard to fill the hole, but generally fails. I actually ended up swapping my Windows laptop for a MacBook, though, so that’s the machine I use when I need to do a stretch of work with PSDs.
That said, bitmap graphics are less and less part of my development workflow. SVGs managed through an icon font generator (and probably soon, SVG sprites) handle most layout imagery. So unless you’re a designer as well as a developer, the lack of Adobe tools virtually ceases to be an issue. The design to dev deliverables turn from PSDs into individual SVG files (and JPGs of page designs for reference) – and software like Inkscape and SVG Cleaner should handle the bits of work you might need to do on those files.
I didn’t go into this much. I knew it would probably be something like Ubuntu. A friend recommended Mint, and that’s been great for me so far.
Obviously we’ve got the ‘L’ going already! You could try the XAMP approach, but I ended up preferring the ‘lighter’ approach of installing using Tasksel. Here’s a great tutorial:
I had most problems getting sendmail working, to send emails via PHP from localhost. Basic installation is fine, but things didn’t work straight away. After a lot of digging, the tip in this comment seemed to get things moving. I think this is just an extra hoop to jump through to be able to send things from a local dev machine that isn’t acting as a host on the web. Hopefully it gets things moving for you too.
There’s various recommendations for simpler alternatives to sendmail out there – I tried a couple but had no luck, and only got going with the above tip. YMMV.
The command line
Worth spending a bit of time on the basics if you’re still a bit lost when it comes to the command line. There’s some good tutorials at LinuxCommand.org, and Computer Hope has good, clear examples of syntax for various operations.
When you start a terminal session, the script at
~/.bashrc (i.e. in your home directory; the file is
.bash_profile on Mac) is first run automatically. This is where you can set up some useful aliases to make working in the command line easier and quicker. Here’s my sample
Cloud storage / file synching
Automated synching of important files across machines is hugely important to my workflow, sometimes in the office, sometimes at home. I don’t use Windows much now, but setting out to dual-boot, as well as having a MacBook, I needed to find a good cross-platform alternative to SugarSync (which I’d been using on Windows, but which has no Linux client).
Dropbox is the market leader, definitely an option. However, I ended up settling on Copy.com. The company offering this, Barracuda, seem to be focussed on the corporate market, but there is a free personal plan with 15 GB space – and they have Windows, Linux and Mac clients. Plus, if you share files or folders with other users, their size doesn’t count against their limits, and vice versa, as per Dropbox – so it could be a good solution for a small team.
When I moved, a client for Linux on Google Drive was still a rumour combined with a slightly ropey unofficial implementation. That might be changing soon – so Google Drive could be an option too.
This is my preferred IDE. As it’s Java-based, you know it’s cross-platform. This tutorial is helpful for installing:
However, apparently it’s because of Java that the fonts are a bit crummy. Fortunately, there’s an easy fix.