Posts Tagged ‘headless’

Linux Command Line Basics Part V: Remote Access 101

Knowing basic *nix terminal commands is an absolute must for any computer pro. Whether you use Windows, Mac OS or Linux, you’re bound to face the command prompt at some stage, so here’s my crash course in CLI. The final sections of the guide will introduce a couple of slightly more advanced concepts which will help you get the most out of your command line experience.

Remote Access 101

ssh

When you open a Terminal window on your Linux or Mac computer, you’re interacting with the operating system through an interface known as a ‘shell’. The Terminal you just opened interfaces with your local computer, but using a protocol called ‘SSH’ you can control a remote computer using the same Terminal interface. (SSH stands for ‘Secure Shell’, owing to its increased level of security over its predecessors.)

SSH allows you to open a Terminal session (a shell) on your local machine which interacts with a remote computer. This is most commonly used in server administration or any computer which runs ‘headless’ (without a monitor).

Having a few SSH tricks in your toolbox is very useful indeed, and later on I’ll show you how to bypass network restrictions and use remote GUI applications as well, but first we need to get connected.

(more…)

Linux Command Line Dropbox Tips & Tricks [dropbox.py]

The fantastic, wonderful, life enhancing file sync platform Dropbox is easily the best way to share your files between your (sometimes many) devices and across (sometimes many) platforms. Every computer you add to your account increases the redundancy of the data you have stored, and if you value your work it’s a real weight off to know your files are stored safely in multiple geographic locations.

Dropbox is super easy to set up for Mac OS X and Windows (although harder for some Linux distros), but if you’ve got a Linux server that you want to hook up, you’ll have to jump through some command-line hoops before you’re ready to go. Luckily, there’s a tutorial page on the Dropbox wiki which is really helpful and, provided there are no hitches, will get you up and running pretty quickly.

There are a couple of points I’d like to make in addition to the previously mentioned document to address a couple of issues I had when I first tried to install the Dropbox CLI Linux client:

  • Make sure you’re logged in as the user you’ll be accessing the files as when you install. Sounds obvious, but some people like to install with an outright ‘su -' rather than a regular ‘sudo' which can lead to syncing the files as root.
  • When you get to the stage where you’re ready to launch the daemon for the first time, make sure you return the command line. Instead of running…
    # ~/.dropbox-dist/dropboxd
    …do yourself a favour and add an & to the end:
    # ~/.dropbox-dist/dropboxd &
    Especially if you have one of the premium accounts (>2GB), the first sync is going to take a long time, so make sure you use the ampersand so you can carry on working in the mean time.
  • Once you’ve installed, grab the dropbox.py control script. You can get it from the Dropbox website by following this link – it’s mentioned on the wiki linked earlier, but is buried right down at the bottom of the page. It should be the first thing you download!
  • If you’re having trouble running the script then try installing ‘python2.6’ and running using:
    # python2.6 dropbox.py
    Again, this is hidden at the bottom of the wiki and is dead important.
  • The three most useful commands for the dropbox.py script are:
    # python2.6 dropbox.py start
    # python2.6 dropbox.py stop
    and
    # python2.6 dropbox.py statusThese three commands give you all the control you should need to proceed with your enjoyment of Dropbox on your headless Linux server.

So there’s a few tips and tricks I want to add to the excellent official Dropbox wiki page. As with everything I post on my site, these are collections of solutions I’ve had to either research from multiple sources, have worked out for myself or have had trouble finding answers for elsewhere, so hopefully I can save you some trouble and help you get up and Dropboxing in less time than it took me the first go around!