ubuntu

14 May

Starting the Awesome window manager on Ubuntu 13.04

in system administration, ubuntu

Awesome is a window manager that you can use to replace or augment other desktop environments like Gnome Desktop and KDE. I find Awesome appealing because of the different perspective it brings to window management. Instead of windows floating free on the desktop, Awesome provides various tiled views of windows. This maximizes screen usage, and also adds some workflow. Keyboard shortcuts are plentiful and convenient (and make use of that otherwise untouched Windows key).

Installing Awesome on Ubuntu 13.04 was a piece of cake:

$ sudo apt-get install awesome awesome-extra

But from there, it got tricky. I expected to log out of my current desktop and be able to switch desktops into Awesome. But Awesome wasn't on the list of desktops. After lots of poking around, I found out why. While Awesome is configured by default, it is also disabled by default. To enable it, you ned to edit /usr/share/xsessions/awesome.desktop and set NoDisplay to false:

[Desktop Entry]
Encoding=UTF-8
Name=awesome
Comment=Highly configurable framework window manager
NoDisplay=false
TryExec=awesome
Exec=awesome
Type=Application

Once that is done, Awesome will show up on the list of desktops in LightDM when you log in. After you're logged in, you can begin to get a feel for Awesome and start tweaking it to your needs.

25 Apr

Instant LAMP Server: Using Cloud-Init to Pre-configure Cloud Compute Instances

in cloud, hpcloud, ubuntu

Cloud compute instances are like disposable servers. They make a great platform for application development as well as deployment. But frankly it's no fun to spend time setting them up time and time again. Lately, I've been amassing a collection of tools and strategies for working with compute instances in the cloud. One thank I think is outstanding for its combination of simplicity and power is Ubuntu's Cloud Init.

To expedite setting up a LAMP (Linux/Apache/MySQL/PHP) server, I've created a very simple Cloud-Config YAML file that I can attach to a build request when I build a compute instance. In this post, I'll show how I do it.

06 Mar

How to use Ubuntu's Upstart to Control Node.js Forever

in linux, node.js, system administration, ubuntu

Recently I needed to start a server written in Node.js. This server was deployed on Ubuntu 12.04, and I wanted it to be started using the system's init system. Yet I also wanted the safety of Forever, a script manager for Node.js.

Ubuntu still supports the classic SysV init style, but it also now supports the far more sophisticated Upstart system. It is appealing for a few reasons: One is that it feels simpler and cleaner. Another is that it is more powerful and easily more configurable. I decided to use it for my scripts.

This article explains how to use Upstart, Forever, and Node.js together to run a Node.js server as a daemon process that is automatically started at system startup, and automatically stops at shutdown or reboot.

10 Dec

Using the Go Syntax for Janus VIM

in go, golang, janus, ubuntu, vim

To add the Go language (golang) plugins to Janus-flavored VIM, it's not enough to install the VIM plugins into your system's default location. So using, for example, Ubuntu's vim-syntax-go package will not work.

The best way to install all of the Go VIM plugins is to do the following:

  • Create a directory in your .janus directory for the go VIM plugin: mkdir ~/.janus/go
  • Download a fresh copy of the Go source: hg clone https://code.google.com/p/go/ (you may need to sudo apt-get install mercurial first)
  • Inside of the go/misc directory, find the vim directory
  • Copy the contents of the vim directory to the .janus/go directory: cp -a vim/* ~/.janus/go.
  • Restart VIM

This will give VIM access to all of the Go plugins. Syntax highlighting should immediately work on all *.go files.

18 Aug

Building PHP from Source on Ubuntu

in Debian, phc, php, programming, ubuntu

This article describes how to build PHP from source on Ubuntu. I am doing this because I need to build PHP with the embeded SAPI -- an option not available by default. For my purposes, I don't want this PHP to replace the existing PHP. Instead, I want it to be available alongside my normal PHP. So the goal is to place this version in /usr/local/php-opt.